| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Because the original code starts at 1, not 0, so this was not
equivalent.
This reverts commit b0a3e10d17f21254c15781bb7ff57736a9bea569.
|
| |
|
|
|
|
|
|
|
| |
Make it possible for named custom types to register additions to the
class init function and to register an instance init function.
An extra class init function is useful in Gtk::WidgetCustomDraw and
Gtk::WidgetCustomSnapshot. Bug 775348
|
|
|
|
|
|
|
| |
std::forward_list is ideally suited for storing pointers to the interfaces
of custom types. The list is often empty, never long. No need to use a pointer
to a container in order to save storage space (as I did in the previous
commit). An empty std::forward_list consists of nothing but a pointer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/class.[cc|h]: Remove the clone_custom_type() overload without
an interface_class_vector_type argument.
* glib/glibmm/interface.cc:
* glib/glibmm/object.cc:
* glib/glibmm/objectbase.[cc|h]: Replace the std::map containing
ExtraObjectBaseData with instance data in ObjectBase. The map was just a way
of avoiding an ABI break, but now we can break ABI.
The new data is a std::unique_ptr<Class::interface_class_vector_type> rather
than a Class::interface_class_vector_type. It's a vector which is used only
during a short period during object construction, and only for custom objects.
With a pointer to the vector, it need not be created for the majority of
objects, and if it is created, it can be deleted when it's no longer needed.
* gio/src/application.ccg:
* glib/glibmm/main.cc: Add #include <mutex> that should have been there before,
but now became necessary, when it was removed from objectbase.h.
|
|
|
|
|
| |
I need to make a subsequent commit to fix the now-unaligned
trailing comments.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/class.cc: Copy the default values of the interface properties
to the class's iface_properties_quark.
* glib/glibmm/property.cc: custom_set_property_callback(): Copy the
default values to object-specific data.
custom_get_property_callback(): Get object-specific value if it exists, else
class-specific default value. Bug #732746.
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/class.[cc|h]:
* glib/glibmm/interface.cc:
* glib/glibmm/property.cc: Rename properties_quark and properties_type to
iface_properties_quark and iface_properties_type.
As custom_[set|get]_property_callback() in property.cc also sets and gets
user-defined properties, this naming choice may be confusing.
These names are intended for use by glibmm only. Renaming is not an
ABI/API break. Bug #731484.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/class.[h|cc]: Add a clone_custom_type() overload that takes
a vector of pointers to Interface_Class instances, so we can call their
add_interface() functions on the GType just after registering it, but before
instantiating the first GObject.
custom_class_init_function(): Override properties of implemented interfaces
that have not been overridden in a base class.
* glib/glibmm/interface.cc:
Interface::Interface(const Interface_Class& interface_class):
If the GObject has not been instantiated yet, then add interface_class to
the Class::custom_interface_classes vector.
* glib/glibmm/objectbase.[h|cc]: Add extra_object_base_data and
extra_object_base_data_mutex.
* glib/glibmm/objectbase.cc: ~ObjectBase(): Erase 'this' from
extra_object_base_data.
* glib/glibmm/object.cc: Default constructor and
Object::Object(const Glib::ConstructParams& construct_params): Pass the list
of Interface_Class pointers to the new Class::clone_custom_type() method
overload. Bug #697229.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/class.cc (Class::clone_custom_type): Specify a custom
base finalize function for the custom type which would free the
properties data that might exist due to properties of implemented
interfaces being overridden. This is better than having an interface
finalize function because the custom type could implement several
interfaces which would mean that the interface finalize function would
execute more than once as opposed to just once for the base finalize
function.
* glib/glibmm/class.h (Class::interface_finalize_function): Replace
with Class::custom_class_base_finalize_function().
* glib/glibmm/interface.cc (Interface_Class::add_interface): Do not
specify a custom interface finalize function.
(Interface::Interface(const Interface_Class&): Also initialize the
property GValues using g_param_value_set_default() so that they are
initialized with the default values of the properties and not just the
default value of the GValue type.
Bug #697229.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/class.cc (Class::properties_quark): Initialize this
GQuark which is used to store/get the data used for setting and
getting the properties of the interfaces that a custom type overrides.
(Class::interface_finalize_function): Add this function which
once invoked frees the property data stored as gqata in the GType and
allocated/appended to in the Glib::Interface constructor below.
* glib/glibmm/class.h: Declare the interface_finalize_function above.
Also declare the quark used to store/get the property data and the
typedef data type of the property data.
* glib/glibmm/interface.cc (Interface_Class::add_interface): Specify a
custom interface finalize function when adding the interface so that
the resources allocated for handling the derived interface properties
can be freed if the type is a custom interface type.
(Interface::Interface(const Interface_Class&)): Modify the constructor
so that when dealing with a custom interface type, it gets a list of
the properties of the interface to be added and overrides these by
appending approperiate GValues to the data used to handle
getting/setting properties that is stored as qdata in the GType. The
constructor uses g_param_spec_overrided() to override the properties
of the implemented interface and g_object_install_property() to
install the properties.
* glib/glibmm/property.cc (PropertyBase::install_property): Rewrite
this method so that the acquired generated id's of custom implemented
properties does not collide with the id's of properties of implemented
interfaces that have been overridden in a custom type. This is done
by offsetting the acquired generated id (by addition) with the number
of already existing properties (the ones that have been overridden).
(custom_get_property_callback): Rewrite this function (which gets
properties for custom types) so that if the property id is less than
or equal to the number of overridden interface properties (which would
mean that an overridden interface property should be gotten) the
correct overridden interface property is gotten. Otherwise, a custom
property should be retrieved, in which case the id is offset (by
subtraction) when the PropertyBase is retrieved from the id which
would ensure getting the correct PropertyBase.
(custom_set_property_callback): Rewrite this function as the above
custom_get_property_callback was rewritten.
|
| |
|
|
|
|
|
|
|
| |
* gio/giomm/*.[h|cc]:
* gio/src/*.[hg|ccg]:
* glib/glibmm/*.[h|cc]:
* glib/src/*.[hg|ccg]: Strip trailing whitespace. Bug #681072.
|
|
|
|
|
| |
* glib/glibmm/class.cc: registered_derived_type(): Use (void*)0 instead
of NULL to avoid a missing sentintel warning.
|
|
|
|
|
|
| |
* glib/glibmm/class.cc: Add casts because GTypeQuery::class_size
and instance_size are guint but GTypeInfo::class_size and
instance_size are guint16.
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Removed the --enable-api-exceptions, --enable-api-properties,
--enable-api-vfuncs and --enable-api-default-signal-handlers options.
* build/reduced.m4: Removed.
* tools/m4/*.m4:
* tools/pm/Output.pm: Remove any use of ifdefs and auto_ptr for reduced API.
* *.[hg|ccg|h|cc]: Remove the idefed code.
|
| |
|
|
|
|
|
|
|
|
| |
* glib/glibmm/wrap.cc: wrap_register(): Silently ignore NULL GTypes.
* glib/glibmm/class.cc: register_derived_type(): Silently ignore NULL
GTypes. Use g_strconcat() instead of ustring+= to maybe make it more
efficient. This helps gstreamermm, which may try to use type names of
plugins that are not actually available on the system.
|
|
|
|
|
|
|
|
|
|
| |
2009-01-20 Deng Xiyue <manphiz@gmail.com>
* Change license header to mention Lesser General Public License
version 2.1 instead of Library General Public License, to be
consistent with COPYING.
svn path=/trunk/; revision=779
|
|
|
|
|
|
|
|
|
|
|
| |
2006-10-04 Murray Cumming <murrayc@murrayc.com>
* glib/glibmm/class.cc:
* glib/src/iochannel.ccg:
* glib/src/markup.ccg: Add a silly line to avoid unused parameters
when GLIBMM_EXCEPTION_ENABLED is not set.
* glib/glibmm/error.h: Do not use G_GNU_NO_RETURN on the version
of throw_exception() that returns, to avoid a warning.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
2005-01-21 Murray Cumming <murrayc@localhost.localdomain>
* glib/glibmm/class.h: #include glibmmconfig.h so that
GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS can
be defined.
* glib/glibmm/class.cc: Use ifdef instead of ifndef where that is
what I meant. Fixes the build.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
2005-01-20 Murray Cumming <murrayc@murrayc.com>
* glib/glibmm/class.h: More use of exern C, with an intermediate
callback, to satisfy the IRIX MipsPro compiler.
* glib/glibmm/container.h: #ifdef out a dynamic_cast that MipsPro
does not allow, and which I can not think of a better place to put.
See the comment in the code.
|
|
|