| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/class.cc: Use glibmm_custom_[get|set]_property_callback().
* glib/glibmm/object.[cc|h]: Add set_data_with_c_callback().
Don't call g_object_set_qdata_full() with a function with C++ linkage, if
GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS is defined.
* glib/glibmm/property.[cc|h]: Declare some local functions extern "C".
Add glibmm_custom_[get|set]_property_callback().
* glib/src/nodetree.[ccg|hg]:
Add glibmm_NodeTree_c_callback_[traverse|foreach]() and
struct NodeTreeCallback[Traverse|Foreach]Data.
Part of issue #1
|
|
|
|
| |
Bug 786824
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Now that RefPtr is really a std::shared_ptr<>, we should use
std::weak_ref<> instead.
Note that a std::weak_ptr<> tells you nothing about whether
the underlying GObject is still alive, which Glib::RefPtr did.
It just tells you whether our std::shared_ptr<> still holds
a reference to it. That's why I removed one of the checks in
tests/giomm_listmodel/main.cc.
|
|
|
|
|
| |
I doubt that this is really necessary with C++11.
Please file a bug if this causes a real compilation problem.
|
|
|
|
|
|
|
| |
Instead of (deprecated) g_object_newv() and (deprecated) GParameter.
This seems to work. It is meant to be the simplest possible change.
I would like to translate this code properly to C++ now that I've noticed it.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
Instead of a (now deprecated) Glib::Threads::Mutex*.
As discussed here:
https://bugzilla.gnome.org/show_bug.cgi?id=757674#c12
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/interface.cc: Don't call ObjectBase's move assignment operator
from Interface's move assignment operator.
* glib/glibmm/object.cc: Perform of job of sigc::trackable's move constructor
in Object's move constructor.
* glib/glibmm/objectbase.cc: Move constructor: Set gobject_ = nullptr.
Fix the assignment of cpp_destruction_in_progress_.
Move assignment: Add self-assignment guard. Avoid the risk of accidentally
deleting *this. Let a call to initialize_move() do most of the job.
* tests/glibmm_interface_move/main.cc:
* tests/glibmm_object_move/main.cc:
* tests/glibmm_objectbase_move/main.cc: Really test move assignment.
Test that the wrapped C object has been moved, and not copied.
Bug #756962.
|
|
|
|
|
| |
Destructors are already noexcept, but this makes that even clearer.
This might be foolish.
|
|
|
|
|
| |
Because the call to the ObjectBase move constructor will not
actually happen. See the comment for the previous commit.
|
|
|
|
|
| |
Add move constructors and move assignment operators so that derived
classes can have these too.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
svn path=/trunk/; revision=749
|
|
|
|
|
|
|
|
|
|
| |
2008-03-10 Tim Mooney <murrayc@murrayc.com>
* glib/glibmm/object.cc: Include string.h to fix the build with
SUN CC.
Bug #498438.
svn path=/trunk/; revision=639
|
|
|
|
|
|
|
|
|
| |
2007-11-20 Sebastien Bacher <seb128@ubuntu.com>
* glib/glibmm/object.cc: fix build issue when using gcc4.3 (#498438)
svn path=/trunk/; revision=465
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/miscutils.cc: Clean up the code a bit.
(get_application_name): Remove the code that checked the string for
valid UTF-8, and attempted conversion if not valid. I must have
been on crack when I wrote this, as the combination of conditions
that would cause the string to be invalid UTF-8 is quite unlikely.
If this is a valid concern at all, it should be filed as a GLib bug
and not worked around in glibmm.
(build_filename(const std::string&, const std::string&)): Just call
the plain g_build_filename() instead of building a temporary array
and passing that via ArrayHandle to the build_filename() overload
for containers.
(build_path): Remove the already deactivated custom implementation
from the time before g_build_pathv() was added to GLib.
* glib/glibmm/object.{cc,h}: Improve/fix a couple of comments.
(ConstructParams::ConstructParams): Add G_GNUC_NULL_TERMINATED
function attribute to make the compiler complain if the variadic
argument list is not terminated by a NULL pointer.
* glib/glibmm/ustring.{cc,h} (utf8_find_last_of): Avoid applying
bitwise logical operators directly to (possibly signed) operands
of char type. In order to avoid relying on implementation-defined
behavior, make sure that the operands are of unsigned integer type.
(ustring::is_ascii): Likewise,
(ustring_Iterator<T>::operator--): Likewise.
(get_unichar_from_std_iterator): De-obfuscate this highly optimized
piece of code, as the current stable release of GCC (4.1.2-pre on
my system) generates better assembler output without the voodoo.
svn path=/trunk/; revision=369
|
|
|
|
|
| |
* glib/glibmm/objectbase.cc: Spring cleaning.
* glib/glibmm/object.cc: ditto.
|
|
|
|
|
|
| |
* glib/glibmm/object.{cc,h} (ConstructParams::ConstructParams):
Implement the copy constructor in a way that actually works if used.
Relying on the compiler to optimize it away is a bad idea. (#132300)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2004-03-13 Murray Cumming <murrayc@murrayc.com>
* tools/m4/class_shared.m4: Remove the parent get_type() call from
the Class::init() function, because it is optimised away, and g++ 3.4
actually complains that it does nothing.
* glib/glibmm/object.[h|cc]: Add a public ConstructParams copy
constructor, needed by g++ 3.4. See comments in the code.
* tests/glibmm_value/glibmm_value.cc: Instantiate instances of
value types, to fix the g++ 3.4 build. I don't know what the code
was meant to do before anyway.
|
|
|
|
|
|
|
|
|
|
|
| |
2004-01-12 Murray Cumming <murrayc@usa.net>
* glib/glibmm/object.cc: Object::Object() default constructor.
Remove the warning because we really need this to implement a custom
TreeModel. Derive a new GType, as in the
Object::Object(ConstructParams) constructor. Like that constructor,
the default one also assumes that you have called a suitable
ObjectBase constructor, such as ObejctBase(typeid(MyCustomClass)).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2003-11-01 Murray Cumming <murrayc@usa.net>
* glib/glibmm/propertyproxy.h, propertyproxy_base.[h|cc]: Now uses
ObjectBase instead of Object, because glib can now have properties
on interfaces. This is needed, for instance, by the GtkFileChooser
interface wrapper in gtkmm.
* glib/glibmm/object.h: Moved get/set_property() methods into
ObjectBase, for the same reason.
* tools/pm/WrapParser.pm, Output.pm: Added optional no_default_handler
parameter to gmmproc _WRAP_SIGNAL() macro, for signals whose
default signal handler is not in the klass struct and therefore
can not be overridden.
|
|
|