1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00
Commit Graph

59 Commits

Author SHA1 Message Date
Brenden Matthews
8c6257d925 Update Lua cairo bindings.
This adds 2 missing functions: cairo_surface_set_device_scale and
cairo_surface_get_device_scale, and also requires cario 1.14 or newer.

This addresses the comments in #1083.
2022-11-11 12:58:04 -05:00
Brenden Matthews
589b240360 Fix create/destroy/set/get Lua Rsvg functions.
We need an interface to be able to create/destroy/set/get the
RsvgRectangle and RsvgDimensionData structs via Lua, which were missing
or incomplete.

Documentation was also missing, which has been updated.
2022-10-16 13:00:05 -04:00
Brenden Matthews
5d5ee12c67
Require librsvg >=2.52. 2022-09-10 11:58:27 -05:00
Brenden Matthews
5d02762903
Comment out rsvg_handle_get_intrinsic_size_in_pixels for now. 2022-09-10 11:57:16 -05:00
Brenden Matthews
182b4f0c11
Don't include version header directly. 2022-09-10 11:24:58 -05:00
Brenden Matthews
d3d804ef0f
rsvg_handle_get_intrinsic_size_in_pixels only available on librsvg 2.52
or newer.
2022-09-10 11:23:00 -05:00
Brenden Matthews
12452f8896
Remove deprecated rsvg_handle_get_dimensions, add
rsvg_handle_get_intrinsic_size_in_pixels.
2022-09-10 10:51:38 -05:00
Brenden Matthews
f156de5a4f
Remove deprecated rsvg_handle_render_cairo, add
rsvg_handle_render_document.
2022-09-10 10:47:31 -05:00
Brenden Matthews
7a5c27a585
Remove deprecated rsvg_handle_render_cairo_sub, add
rsvg_handle_render_layer in place.
2022-09-10 10:44:45 -05:00
Brenden Matthews
9f2b71b0a7
Require librsvg>=2.46, fix lua interface. 2021-02-27 10:18:25 -06:00
Brenden Matthews
05fff02e70
Remove librsvg deprecated definitins. 2021-02-27 10:01:03 -06:00
Brenden Matthews
6eae8e8c24
Remove use of deprecated librsvg functions. 2021-02-27 09:50:44 -06:00
Brenden Matthews
308f2cb8ea
Update copyright, authors. 2021-02-27 09:14:19 -06:00
Brenden Matthews
b8d956f884 Add clang 8 to builds.
Also added new librsvg functions, and ignore deprecation warnings on new
versions of librsvg.

Disable sccache on FreeBSD.
2019-04-14 14:42:59 -04:00
Brenden Matthews
90673cf161 Make GitLab build work with clang checks. 2019-02-23 17:13:19 -05:00
lasers
7eec746b82 update copyright year to 2019 2019-01-05 11:15:36 -06:00
Brenden Matthews
03f3ce7bdc Reformat CMake files.
Applied `cmake_format`.
2019-01-03 09:48:43 -05:00
Brenden Matthews
bc60fb2c2f
More build fixes. 2018-12-22 18:34:29 -05:00
Brenden Matthews
dfd10667fd
More build fixes, warning fixes. 2018-12-22 15:37:53 -05:00
Brenden Matthews
bb8723dd36
Add toluapp subtree (#712)
* First commit!

* Import to git

* Droping down CMake requirement

* Corrected installation of libraries

* Adding travis build

* Updated cmake macros

* Fixed find package

* Updated travis hook

* Updated travis hook

* Patch to support Lua 5.3.

* Fix Lua header include directives in tolua++.h

Use angle bracket rather than double quotes when including Lua headers in the tolua++ header. This fixes a problem on systems that default to a Lua version newer than 5.1 and install the tolua++ header to the same directory as newer Lua headers.

As there are (usually) no Lua headers in the same directory when building tolua++ itself, the preprocessor will look to the include directories passed to the compiler, one of which would be the Lua 5.1 include directory, and tolua++ will build with those (correct) headers. Then the tolua++ header is usually installed in the default include directory, alongside the newer Lua headers, which you wouldn't expect to cause any trouble.

But it does cause trouble when trying to build other programs that include the tolua++ header, because now the preprocessor does find Lua headers in the same directory as the tolua++ header, which are the newer (incorrect) headers. Now the program will either fail to compile, because it doesn't support the newer headers, or fail to link with the tolua++ shared object because they were compiled against different Lua headers.

Using angle brackets instead of double quotes in the include directives will fix the problem, because then the preprocessor will look to the include directories passed to the compiler first.

See http://www.cegui.org.uk/forum/viewtopic.php?f=10&t=7195

* Remove email notifications.

* Update travis build.

* Build shared and static libs.

* Patch toluapp to support Lua 5.3.

With this change, support for Lua 5.1 is dropped.

This resolve #116.

* Add some comments to clarify the toluapp handling.

* Add minor sonar fix.
2018-12-20 15:18:51 -05:00
Nikolas Garofil
4d5db325d9 Fix problems found when fixing docker (#575)
* Require at least glib-2.36 (from 03/2013) to remove deprecated g_type_init()

* Fix empty continuation line in Dockerfile

* Require at least libmicrohttpd 0.9.25 (from 09/2012) to replace deprecated MHD_create_response_from_data()

* fix versioncheck libmicrohttpd

* Missing char for null-terminator in print_v6addrs()

* safe_asprintf to fix /proc/subdir bufferoverflows

There is no max length of /proc/subdir, increasing the value of /proc/sys/kernel/pid_max is one way this can happen

* Fix conversion constant c++ string to variable char array

* Fix strncpy using unrelated MPD_BUFFER_MAX_LENGTH

* Use strncpy instead of strcpy in eve.cc

* Use strncpy instead of strcpy in libmpdclient.cc

* move safe_asprintf back and use ostreams in proc.cc to make sonarcloud happy
2018-08-07 09:38:36 -04:00
Brenden Matthews
124b3dfaa4
Added destroy methods to some functions to fix memory leaks. (#535) 2018-07-08 20:51:44 -04:00
Brenden Matthews
eebc8c653b
Add formatting/static analysis (#486)
* Reform source with clang-format.

Rules applied with:
    $ find . -iname *.h -o -iname *.cc | xargs clang-format \
        -style=file -i -fallback-style=google

* Add clang-format and analyze to build.

Based on the excellent work at: https://github.com/ttroy50/cmake-examples

* Clean up CMake stuff on macOS.

* Remove vim/emacs modelines.

* Update copyright dates.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.
2018-05-12 12:03:00 -04:00
marguerite
89f9a6bdf1 respect LIB_INSTALL_DIR 2016-01-07 14:42:14 +08:00
Miroslav Lichvar
2231588b28 Use LIB_SUFFIX when installing libraries
This is needed on systems with /usr/lib64.
2015-11-18 09:08:06 +01:00
Vincent Cheng
b8082ca1fa Avoid clobbering CFLAGS/CXXFLAGS set by user 2015-07-07 01:38:12 -07:00
Oliver Wilkerson
935280e36c Added cairo blending modes to support libcairo-1.10.0 2013-10-31 18:12:57 -05:00
Jochen Keil
56b5a7eeca Wrapper for drawing images with imlib2 and cairo
One problem is, that tolua/lua does not handle plain data pointers
properly. Therefore something like

local surface = cairo_image_surface_create_for_data(
    imlib_image_get_data_for_reading_only(), ..

will fail using the lua bindings. Hence this wrapper, which adds
a function which be used to draw an imlib image to a cairo surface.

This also addresses another issue, drawing images with a transparent
background (e.g. gifs or pngs) to the cairo surface properly. Apparently
the image format of imlib is incompatible to cairos which uses
pre-multiplied data. This is also explained in the cairo documentation.
A fix for this issue is to blend the image with another alpha mask to
get the correct values. The code and explanation for this was taken from

  http://lists.cairographics.org/archives/cairo/2008-March/013492.html

Executive Summary: This wrapper function can load (transparent) images
(e.g. gif or png) from a file by using imlib and draw them on a cairo
surface.
2013-06-08 12:09:35 +02:00
Jochen Keil
550d644e6c Add rsvg bindings to cmake build framework 2013-05-22 22:39:41 +02:00
Jochen Keil
bec61e922c Include header file for helper functions
Also add function declarations
2013-05-22 22:38:17 +02:00
Jochen Keil
dee71f4eb2 Functions for creating and accessing Dimension/Position structs 2013-05-22 22:37:05 +02:00
Jochen Keil
32c60685ba Wrapper functions for {creat,destroy}ing an rsvg handle
This wrapper functions should facilitate the handling of rsvg handles.
Especially unrefing with g_object_unref does not seem to work properly
using the lua bindings.
2013-05-22 22:35:39 +02:00
Jochen Keil
118332aa00 Inline typedefs 2013-05-22 22:31:57 +02:00
Jochen Keil
4920cb71be Remove unused GIO/GdkPixbuf interface
Conky Lua only uses cairo, so that's everything we need to keep.
Anything else is just a source for trouble.
2013-05-22 22:31:57 +02:00
Jochen Keil
04c7323cac Replace glib types with primitive types
This help tolua++ to recognize them as native types and not as
usertypes.
2013-05-22 22:31:57 +02:00
Jochen Keil
cf94f82c53 Initial groundwork for rsvg bindings
Add scratch files as a start: merge rsvg.h and rsvg-cairo.h.
Concatenate licenses of rsvg.h and rsvg-cairo.
Remove unnecessary defines, private structs, unused apis
(GIO/GdkPixbuf), etc.
Replace deprecated api functions with glib-object functions
Add headers for glib.h and librsvg/rsvg.h
2013-05-22 22:27:27 +02:00
James Morris
2a1afbbbba fix lua/cairo/imlib2 linkage issues 2013-01-15 00:02:25 +00:00
Brenden Matthews
ddef05d4eb Update version, copyright. 2012-05-03 16:34:44 -07:00
Pavel Labath
c80deb2d69 Fix "wrong type of arguments for cairo_set_dash", sf.net #3014648
I am not particularly proud of this solution. If you have a better one, feel free to implement
it.
2010-06-13 18:57:07 +02:00
Brenden Matthews
58cbbf57a3 Coulpe minor build fixes. 2010-01-04 18:43:40 -08:00
Brenden Matthews
b8a678728c Remove automake build system, fix defconfig.h. 2010-01-04 18:07:49 -08:00
Brenden Matthews
2951f5571c Add missing copyright notices. 2010-01-01 15:49:41 -08:00
Brenden Matthews
cf9e498b24 Update copyright notices. 2010-01-01 15:46:17 -08:00
Brenden Matthews
fb33419cd4 Add CMake build support for Lua bindings. 2009-12-17 19:46:26 -08:00
Brenden Matthews
f36f747aca Add (broken) cmake build stuff. 2009-11-26 11:25:32 -08:00
Brenden Matthews
8bd41caa51 Add creation functions for certain cairo structures. 2009-11-25 12:53:42 -08:00
Brenden Matthews
584d05d2ad Add the -p/--pause command line option. 2009-10-03 14:26:39 -07:00
Phil Sutter
ce7ec81531 fix lua automake rules for distfile creation 2009-09-05 02:37:11 +02:00
Brenden Matthews
932131f7eb Actually fix Lua extra compiler includes.
I did it wrong with 1a86405cd9.
2009-07-30 23:41:33 -06:00
Brenden Matthews
17298fee2f Undo some automake brain damage. 2009-07-30 23:19:48 -06:00