template<typename T, typename Tr = Glib::Container_Helpers::TypeTraits<T>>
class Glib::ArrayHandler< T, Tr >
A utility for converting between std::vector and plain C arrays.
This would normally only be used by glibmm or gtkmm itself, or similar libraries that wrap C APIs.
For instance:
{
return
}
static VectorType array_to_vector(const CType *array, std::size_t array_size, Glib::OwnershipType ownership)
@ OWNERSHIP_DEEP
Definition: containerhandle_shared.h:53
or
{
{
gdk_display_store_clipboard(gobj(),
time_,
}
}
size_type size() const noexcept
A utility for converting between std::vector and plain C arrays.
Definition: vectorutils.h:467
static ArrayKeeperType vector_to_array(const VectorType &vector)
RefPtr<> is a reference-counting shared smartpointer.
Definition: refptr.h:52
Glib::ustring has much the same interface as std::string, but contains Unicode characters encoded as ...
Definition: ustring.h:327
T::BaseObjectType * unwrap(T *ptr)
Get the underlying C instance from the C++ instance.
Definition: wrap.h:124
Note that usage below is wrong - data() returns a pointer to data owned by a temporary ArrayKeeper returned by vector_to_array(), which is destroyed at the end of this instruction. For details, see Glib::ArrayKeeper.