Commit Graph

86 Commits

Author SHA1 Message Date
Niels De Graef 746a72b956 Make sure to use % for constants
Documentation-wise in C, this doesn't matter a lot, but it allows
GObject-Introspection based bindings to use their built-in versions when
they want to render any kind of documentation (for example, docs for
Python plugins can render `%NULL` as `None`).
2019-08-03 07:53:47 +00:00
Michael Natterer 792264ba6a app: add gimp_suggest_trc_for_component_type()
and use it in GimpTemplateEditor and convert-precision-dialog, instead
of duplicating the logic.
2019-05-31 17:28:20 +02:00
Michael Natterer 317b09c90f app: rename gimp_rec_rm() to gimp_file_delete_recursive()
and move it to the right place in gimp-utils.[ch].
2019-05-31 17:11:50 +02:00
Ell 8ef461bb70 app: s/gimp_list_compare()/gimp_g_list_compare()/
... so we don't clash with the GimpList namespace.
2019-05-30 03:31:46 -04:00
Ell c4ce70a2d3 app: add gimp_list_compare()
... which lexicographically (shallowly) compares a pair of GLists.
2019-05-30 01:51:06 -04:00
Jehan 50aa7233b2 app: add extension installation in GimpExtensionManager.
This completes my earlier commit 406279e4ef.
Extension installation is not about just decompressing a file in the
right folder. We must also make the extension manager and the GUI aware
of this newly available extension.
2019-04-29 20:56:28 +09:00
Ell 4fefab1798 app: fix line-angle constraint when xres != yres
Fix gimp_constrain_line() and friends to properly constrain line
angles when the image's horizontal and vertical resolutions are
different, and dot-for-dot is disabled.
2018-07-15 19:09:06 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell 3301c06163 app: add gimp_ascii_strtoi() and gimp_ascii_strotod()
... which are similar to g_ascii_strtoll() (except that
gimp_ascii_strtoi returns a gint, and not a gint64), and
g_ascii_strtod(), however, they make error checking simpler, by
returning a boolean value, indicating whether the conversion was
successful (taking both conversion and range errors into account),
and return the actual value through a pointer.
2018-06-20 15:08:59 -04:00
Ell e090b910c0 app: add gimp_data_input_stream_read_line_always()
... which is a drop-in replacement for
g_data_input_stream_read_line(), however, it always returns a non-
NULL value when there's no error.  If the end-of-file is reached,
an empty string is returned.
2018-06-20 15:08:59 -04:00
Tobias Ellinghaus c1e73b1cd4 Fix compile 2018-05-20 21:06:30 +02:00
Jehan 33a92e2447 app: get rid of gimp_get_backtrace().
It is not used anywhere anymore and can be replaced by the more powerful
gimp_stack_trace_print() (which can also allocate a string containing
the backtrace, hence is a proper replacement call).
2018-05-05 20:18:25 +02:00
Michael Natterer 539927ebfa app: replace all g_assert() by the newly added gimp_assert()
which is just a #define to g_assert for now, but can now easily be
turned into something that does some nicer debugging using our new
stack trace infrastructure. This commit also reverts all constructed()
functions to use assert again.
2018-02-11 22:23:10 +01:00
Jehan 4c2df9b365 app: all remaining g_assert() replaced by critical warning and return...
... in app/core.
Continuing on my crusade against asserting and crashing GIMP.
2018-01-22 16:20:04 +01:00
Michael Natterer 8df06eb5cd app: get rid of GParameter and g_object_newv() (deprecated in GLib 2.54)
Replace gimp_parameter_*() utility functions with equivalent
gimp_properties_*() functions which deal with separate arrays of names
and values, and use g_object_new_with_properties() instead of
g_object_newv().
2018-01-01 15:20:05 +01:00
Ell 984ed6cefd app: constrain line angles in display space, not image space
Add an offset_angle parameter to gimp_constrain_line(), which
offsets the radial lines by a given angle.

Add gimpdisplayshell-utils.[ch], with two new functions:

  - gimp_display_shell_get_constrained_line_offset_angle():
    Returns the offset angle to be passed to
    gimp_constrain_line(), in order to constrain line angles in
    display space, according to the shell's rotation angle and
    flip mode.

  - gimp_display_shell_constrain_line():  A convenience function
    which calls gimp_constrain_line() with the said offset angle.

Use the new functions in all instances where we constrain line
angles, so that angles are constrained in display space, rather
than image space.

The only exception is GimpEditSelectionTool, which keeps
constraining angles in image space, since it's not entirely obvious
that we want to constrain angles of dragged layers/selections in
display space.
2017-12-22 06:32:24 -05:00
Michael Natterer 0cfe550639 app, pdb: change a lot of GIMP_LAYER_MODE_NORMAL_LEGACY to just NORMAL
this commit changes just those which make no difference to
functionality: property and object member defaults that get overridden
anyway, return values of g_return_val_if_fail(), some other stuff.
2017-08-19 20:33:47 +02:00
Michael Natterer 3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Jehan 84ee79c71d app: clean out many tabs under app/core/. 2016-11-25 05:51:03 +01:00
Michael Natterer ce639f031b app: fall back to BG fill if gimp_get_fill_params() doesn't find a pattern 2016-10-09 21:07:08 +02:00
Michael Natterer 5455b8bfd0 app: move some stuff out of app/file/
file-procedure.[ch] is gone and its functions moved to
GimpPlugInManager where they belong (the manager keeps around the
lists of load, save and export procedures).

Utility functions from file-utils.[ch] that have nothing to do with
image files moved to core/gimp-utils.[ch].
2016-01-03 23:38:08 +01:00
Michael Natterer e8a5f285a7 app: change GimpBuffer to keep around an actual GimpColorProfile
not an icc_data blob. This simplifies the code using GimpBuffers
together with color profiles.
2015-08-16 13:14:56 +02:00
Michael Natterer 09cd5f6720 app: add ICC data/length parameters to gimp_layer_new_from_gegl_buffer()
and pass them where we know the buffer could be from another image.
Pass "NULL, 0" if we know it's the same image.

Add gimp_layer_new_convert_profile() which takes the newly created
layer and the ICC data/length; call it from both
gimp_layer_new_from_gegl_buffer() and gimp_layer_new_from_pixbuf().

gimp_layer_new_convert_profile() is empty, this is just
infrastructure.
2015-06-20 00:39:44 +02:00
Michael Natterer 7d4948b190 app: use gimp_create_image_from_buffer() to create the debug image graph 2015-06-19 23:49:41 +02:00
Michael Natterer db09d0f3d3 app: move functions to create layers to new files gimplayer-new.[ch] 2015-06-17 13:21:01 +02:00
Mikael Magnusson c889e68d8d app: fix gimp_file_is_executable check to not return true for directories 2014-10-29 19:14:56 +01:00
Mukund Sivaraman 1dc873b860 app: Fix return types 2014-09-03 09:09:00 +05:30
Michael Natterer 980ba7f85a app: move memsize functions into their own files gimp-memsize.[ch] 2014-08-12 13:57:57 +02:00
Michael Natterer 9bb3aee163 app: add gimp_file_is_executable() to gimp-utils.[ch]
including PATHEXT magic for windows.
2014-08-04 02:38:24 +02:00
Michael Natterer 6209b1f571 libgimpbase, app: move gimp_file_has_extension() to libgimpbase
and use it in GimpModuleDB.
2014-08-03 20:47:37 +02:00
Michael Natterer da26597467 app: add gimp_file_has_extension() and use it in GimpDataFactory 2014-08-02 23:29:00 +02:00
Michael Natterer 2b1735f784 app: move gimp_file_compare() to gimp-utils.[ch]
It's a GCompareFunc to be used for finding GFiles in lists.
2014-08-02 15:07:26 +02:00
Michael Natterer 48ece1f31d app: revive debug utility function gimp_create_image_from_buffer()
and fix it not to leak the created image.
2014-06-30 21:06:13 +02:00
Michael Natterer 9f0fde1397 app: add gimp_gegl_pyramid_get_memsize(), used by gimp_projection_get_memsize() 2014-06-15 18:21:05 +02:00
Michael Natterer 38c86da8e9 app: factor out utility function gimp_get_fill_params()
which returns an error if there is no pattern for GIMP_FILL_PATTERN.
Use it instead of having the same code in 3 variants, and make error
handling consistent with bucket fill.
2014-06-03 14:00:01 +02:00
Michael Natterer 7f23fbec34 app: add screen and monitor to all display and image window constructors
so they appear on the proper monitor as well.
2014-05-02 20:21:41 +02:00
Michael Natterer 98cef1273b Bug 704980 - uclibc - base-utils.c: execinfo.h: No such file or directory
Forgot to apply the same fix to master.
2013-11-10 22:09:54 +01:00
Mukund Sivaraman 84f90455b9 app: Remove unused macro 2013-05-30 10:52:09 +05:30
Michael Natterer a7dc8d4429 app: remove gimp_get_number_of_processors(), use g_get_num_processors() 2013-05-25 22:50:23 +02:00
Michael Natterer f4d7d1475d app: add debug utility function gimp_create_image_from_buffer() 2013-04-30 17:17:43 +02:00
Petr Kubiznak 194ef70d74 Bug 593167 - Support Windows in gimp_get_default_unit()
Function gimp_get_default_unit ported for Windows using standard GetLocaleInfo() function (from windows.h).
2013-03-30 10:19:57 -04:00
Michael Natterer ede421bd45 app: rename GimpBaseConfig to GimpGeglConfig
because that's its future purpose.
2012-05-14 22:57:58 +02:00
Michael Natterer 7610e299ae Use GimpValueArray and GimpParamSpecValueArray
instead of the deprecated stuff from GLib.
2012-05-04 00:51:50 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 5e18004bff app: get rid of base-utils.[ch] and move its functions to gimp-utils.[ch] 2012-05-02 17:51:13 +02:00
Michael Natterer 5a7b7d9a4b app: add gimp_gegl_buffer_get_tile_manager()
and ust it in some get_memsize() functions instead of having a
FIXME. So many files changed because they need to inlcude <gegl.h>
now.
2012-05-02 17:46:07 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 8184296b3c app: add gimp_container_get_neighbor_of() to GimpContainer
instead of gimp_container_get_neighbor_of_active() in gimp-utils.c.
Move the additional GimpContext logic of the old function into the
callers, but use the new function in more places.
2011-03-13 02:14:44 +01:00
Martin Nordholts ee81f23f0a app: Add gimp_enum_get_value_name() utility function 2010-10-26 14:23:08 +02:00