Commit Graph

22 Commits

Author SHA1 Message Date
Jehan 8f87277653 libgimpbase: same fix as previous commit to other static types.
This member of the GTypeInfo structure is the size of the object
instance (not of the parent instance). Let's fix it for all static type
registrations in this file, which had the same bug as commit
0eb6ff41cf.
Happy new year everyone!
2019-12-31 20:10:00 +01:00
Michael Schumacher 0eb6ff41cf libgimpbase: fix wrong sizeof in gimp_param_object_array_get_type
Spotted by Massimo Valentini. Fixes issue #4417.
2019-12-31 14:35:39 +01:00
Michael Natterer 1856990c2b libgimp*: check all return values of g_param_spec_internal()
like in the fix for issue #4392. Remove the reference to the issue
from gimp_param_spec_layer() because we can't have it in all places
that now do checks.
2019-12-27 19:53:08 +01:00
Niels De Graef a551043ffe libgimpbase: Use G_DEFINE_BOXED_TYPE()
This isn't any functional change, but allows us to get rid of some of
the GObject boilerplate.
2019-11-05 10:14:29 +00:00
Michael Natterer e902871926 libgimpbase: fix docs 2019-09-05 21:27:11 +02:00
Michael Natterer 0fefb7e922 libgimpbase: add GimpObjectArray and GimpParamSpecObjectArray 2019-09-05 13:01:00 +02:00
Michael Natterer 738b17063a libgimpbase: add an own struct for GimpStringArray
instead of re-using the GimpArray struct, which was confusing
particularly because of the meaning of the "length" member.
2019-09-05 13:01:00 +02:00
Michael Natterer d62e75a41f Move GimpParamSpecString from libgimp back to app
It's just too weird to be public. Remove its properties from the wire
protocol and from pluginrc. Instead, have all GParamSpecs' flags on
the wire and in pluginrc, so we can use stuff like
GIMP_PARAM_NO_VALIDATE.

Port the remaining few places to GIMP_PROC_ARG_STRING().

I'm sure something is broken now wrt UTF-8 validation,
will add tighter checks in the next commit.
2019-08-19 12:54:52 +02:00
Michael Natterer 652fd75891 Rename GIMP_TYPE_INT8_ARRAY to GIMP_TYPE_UINT8_ARRAY
and GimpParamSpecInt8Array to GimpParamSpecUInt8Array
2019-08-15 15:04:34 +02:00
Michael Natterer 350abba213 Remove GIMP_TYPE_INT16 and GimpParamSpecInt16
Use gint and GParamSpecInt with the right value range instead.
2019-08-15 14:17:17 +02:00
Michael Natterer 5a09523214 Remove GIMP_TYPE_INT32 and GimpParamSpecInt32
Use gint and GParamSpecInt instead.
2019-08-15 14:04:56 +02:00
Michael Natterer 1bf90ec77f Remove GIMP_TYPE_INT8 and GimpParamSpecInt8
Use guchar and GParamSpecUChar instead.
2019-08-15 13:34:11 +02:00
Michael Natterer e6d662e352 libgimp*: various doc fixes 2019-08-10 12:32:25 +02:00
Michael Natterer 4add4c6645 libgimpbase: add a GimpStringArray typedef and use it 2019-08-09 12:54:09 +02:00
Jehan 17eb4c551f Revert "libgimpbase: fix/improve docs/annotations."
This partly reverts commit d999248d70.

The GimpStringArray is still very weirdly handled, in particular
regarding the difference of processing with static_data set or not.
Still this g_return_val_if_fail() was making more problems. It may come
back but will need more coding to handle the side effects.
2019-08-05 23:43:44 +02:00
Jehan fead2f7d9d libgimpbase: fix broken annotation.
s/default_/default_value/
2019-08-05 16:41:44 +02:00
Jehan d999248d70 libgimpbase: fix/improve docs/annotations.
Our GimpStringArray is so weird. We are obviously expecting it to be
NULL-terminated since, when we duplicate the data, we add one value.
Yet we were not checking that the stored data was NULL-terminated, in
particular when the string array is created with static data (in which
case, we use the input data as-is, without re-allocating).

Note that this doesn't fix the type mismatch Gimp.StringArray vs
Gimp.Array when introspecting.
2019-08-05 16:29:52 +02:00
Michael Natterer 254271971e libgimp*: more docs and annotations 2019-08-05 15:57:11 +02:00
Jehan 515bfe94e3 libgimpbase: add annotations to several functions.
Not all of the public functions in the file, but at least the ones with
warnings.
2019-08-05 15:43:35 +02:00
Jehan 1627aacaa5 libgimp, libgimpbase: add some documentation for new functions.
Just for a few of them just now as I needed these for my binding plug-in
tests, and without the proper annotations, these functions were
unavailable.
2019-08-01 12:24:06 +02:00
Michael Natterer 9e50f1ed8f libgimpbase: NULL-terminate the result of gimp_value_dup_string_array()
so it can be free'd with g_strfreev().
2019-07-30 01:38:07 +02:00
Michael Natterer 76ee0f6559 app, libgimpbase: move lots of GValue and GParamSpec types to libgimpbase
all the stuff from app/core/gimpparamspecs.[ch] that is not about
image, drawable etc IDs, these will have to go to libgimp with
different implementations than in app/.
2019-07-26 15:54:33 +02:00