unico-1.0.3+14.04.20140109/0000755000015000001560000000000012263445654015174 5ustar pbuserpbgroup00000000000000unico-1.0.3+14.04.20140109/build/0000755000015000001560000000000012263445654016273 5ustar pbuserpbgroup00000000000000unico-1.0.3+14.04.20140109/build/as-compiler-flag.m40000644000015000001560000000273612263445534021664 0ustar pbuserpbgroup00000000000000dnl as-compiler-flag.m4 0.1.0 dnl autostars m4 macro for detection of compiler flags dnl David Schleef dnl $Id: as-compiler-flag.m4,v 1.1 2005/12/15 23:35:19 ds Exp $ dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_COMPILER_FLAG], [ AC_MSG_CHECKING([to see if compiler understands $1]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then m4_ifvaln([$2],[$2]) true else m4_ifvaln([$3],[$3]) true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_COMPILER_FLAGS(VAR, FLAGS) dnl Tries to compile with the given CFLAGS. AC_DEFUN([AS_COMPILER_FLAGS], [ list=$2 flags_supported="" flags_unsupported="" AC_MSG_CHECKING([for supported compiler flags]) for each in $list do save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $each" AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then flags_supported="$flags_supported $each" else flags_unsupported="$flags_unsupported $each" fi done AC_MSG_RESULT([$flags_supported]) if test "X$flags_unsupported" != X ; then AC_MSG_WARN([unsupported compiler flags: $flags_unsupported]) fi $1="$$1 $flags_supported" ]) unico-1.0.3+14.04.20140109/build/Makefile.am0000644000015000001560000000004112263445534020317 0ustar pbuserpbgroup00000000000000EXTRA_DIST = as-compiler-flag.m4 unico-1.0.3+14.04.20140109/README0000644000015000001560000000000012263445534016037 0ustar pbuserpbgroup00000000000000unico-1.0.3+14.04.20140109/INSTALL0000777000015000001560000000000012263445654023431 2/usr/share/automake-1.11/INSTALLustar pbuserpbgroup00000000000000unico-1.0.3+14.04.20140109/NEWS0000644000015000001560000000065312263445534015674 0ustar pbuserpbgroup00000000000000unico 1.0.2 (March 29, 2012) ---------------------------- * Updated to work with Gtk+ 3.4.0. * Fixed one memory leak. * Allow using a texture for the resize grip. unico 1.0.1 (September 1, 2011) ------------------------------- * Some tweaks for the GtkSpinButton. Bugs fixed: 833958 gtk_render_line doesn't work if y0 == y1 or x1 == x0 unico 1.0 (August 10, 2011) --------------------------- * First public release. unico-1.0.3+14.04.20140109/unico/0000755000015000001560000000000012263445654016311 5ustar pbuserpbgroup00000000000000unico-1.0.3+14.04.20140109/unico/unico-types.h0000644000015000001560000000345012263445534020740 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #ifndef UNICO_TYPES_H #define UNICO_TYPES_H #define DRAW_ARGS GtkThemingEngine *engine, \ cairo_t *cr, \ gdouble x, \ gdouble y, \ gdouble width, \ gdouble height G_BEGIN_DECLS enum { SIDE_LEFT = 1, SIDE_BOTTOM = 1 << 1, SIDE_RIGHT = 1 << 2, SIDE_TOP = 1 << 3, SIDE_ALL = 0xF }; typedef enum { UNICO_STYLE_DEFAULT = 0, UNICO_NUM_STYLES = 1 } UnicoStyles; typedef struct _UnicoStyleFunctions UnicoStyleFunctions; struct _UnicoStyleFunctions { void (*draw_arrow) (GtkThemingEngine *engine, cairo_t *cr, gdouble angle, gdouble x, gdouble y, gdouble size); void (*draw_expander) (DRAW_ARGS); void (*draw_focus) (DRAW_ARGS); }; G_END_DECLS #endif /* UNICO_TYPES_H */ unico-1.0.3+14.04.20140109/unico/unico.h0000644000015000001560000000164712263445534017604 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #ifndef UNICO_H #define UNICO_H #include G_BEGIN_DECLS G_END_DECLS #endif /* UNICO_H */ unico-1.0.3+14.04.20140109/unico/unico-draw.h0000644000015000001560000000204712263445534020532 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #ifndef UNICO_DRAW_H #define UNICO_DRAW_H G_BEGIN_DECLS #include #include "unico-types.h" G_GNUC_INTERNAL void unico_register_style_default (UnicoStyleFunctions *functions); G_END_DECLS #endif /* UNICO_DRAW_H */ unico-1.0.3+14.04.20140109/unico/unico-engine.c0000644000015000001560000000754712263445534021047 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #include #include #include #include "unico.h" #include "unico-cairo-support.h" #include "unico-draw.h" #include "unico-engine.h" #include "unico-support.h" #include "unico-types.h" #define UNICO_NAMESPACE "unico" #define UNICO_CAIRO_INIT \ cairo_set_line_width (cr, 1.0); \ cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE); \ cairo_set_line_join (cr, CAIRO_LINE_JOIN_MITER); G_DEFINE_DYNAMIC_TYPE (UnicoEngine, unico_engine, GTK_TYPE_THEMING_ENGINE) static void unico_engine_render_arrow (GtkThemingEngine *engine, cairo_t *cr, gdouble angle, gdouble x, gdouble y, gdouble size) { UnicoStyleFunctions *style_functions; UNICO_CAIRO_INIT unico_lookup_functions (UNICO_ENGINE (engine), &style_functions); style_functions->draw_arrow (engine, cr, angle, x, y, size); } static void unico_engine_render_expander (GtkThemingEngine *engine, cairo_t *cr, gdouble x, gdouble y, gdouble width, gdouble height) { UnicoStyleFunctions *style_functions; UNICO_CAIRO_INIT unico_lookup_functions (UNICO_ENGINE (engine), &style_functions); style_functions->draw_expander (engine, cr, x, y, width, height); } static void unico_engine_render_focus (GtkThemingEngine *engine, cairo_t *cr, gdouble x, gdouble y, gdouble width, gdouble height) { UnicoStyleFunctions *style_functions; UNICO_CAIRO_INIT unico_lookup_functions (UNICO_ENGINE (engine), &style_functions); style_functions->draw_focus (engine, cr, x, y, width, height); } void unico_engine_register_types (GTypeModule *module) { unico_engine_register_type (module); } static void unico_engine_init (UnicoEngine *engine) { unico_register_style_default (&engine->style_functions[UNICO_STYLE_DEFAULT]); } static void unico_engine_class_init (UnicoEngineClass *klass) { GtkThemingEngineClass *engine_class = GTK_THEMING_ENGINE_CLASS (klass); engine_class->render_arrow = unico_engine_render_arrow; engine_class->render_expander = unico_engine_render_expander; engine_class->render_focus = unico_engine_render_focus; gtk_theming_engine_register_property (UNICO_NAMESPACE, NULL, g_param_spec_boxed ("arrow-texture", "Arrow texture", "Arrow texture", CAIRO_GOBJECT_TYPE_PATTERN, 0)); } static void unico_engine_class_finalize (UnicoEngineClass *klass) { } unico-1.0.3+14.04.20140109/unico/unico-support.h0000644000015000001560000000222012263445534021302 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #ifndef UNICO_SUPPORT_H #define UNICO_SUPPORT_H #include #include "unico-engine.h" #include "unico-types.h" G_BEGIN_DECLS G_GNUC_INTERNAL void unico_lookup_functions (UnicoEngine *engine, UnicoStyleFunctions **functions); G_END_DECLS #endif /* UNICO_SUPPORT_H */ unico-1.0.3+14.04.20140109/unico/unico-cairo-support.h0000644000015000001560000000412112263445534022377 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #ifndef UNICO_CAIRO_SUPPORT_H #define UNICO_CAIRO_SUPPORT_H #include G_BEGIN_DECLS G_GNUC_INTERNAL void unico_cairo_round_rect (cairo_t *cr, gdouble x, gdouble y, gdouble width, gdouble height, gint radius, guint hidden_side, GtkJunctionSides junction); G_GNUC_INTERNAL void unico_cairo_round_rect_inner (cairo_t *cr, gdouble x, gdouble y, gdouble width, gdouble height, gint radius, guint sides, GtkJunctionSides junction); G_END_DECLS #endif /* UNICO_CAIRO_SUPPORT_H */ unico-1.0.3+14.04.20140109/unico/unico-support.c0000644000015000001560000000240412263445534021301 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #include #include "unico-engine.h" #include "unico-support.h" #include "unico-types.h" void unico_lookup_functions (UnicoEngine *engine, UnicoStyleFunctions **functions) { /* only one style is defined now, * add here a check for a theming engine css property, * for example -unico-style, and assign new styles */ if (functions) *functions = &engine->style_functions[UNICO_STYLE_DEFAULT]; } unico-1.0.3+14.04.20140109/unico/unico-theme.c0000644000015000001560000000263212263445534020672 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #include #include #include "unico-engine.h" G_MODULE_EXPORT void theme_init (GTypeModule *module); G_MODULE_EXPORT void theme_exit (void); G_MODULE_EXPORT GtkThemingEngine* create_engine (void); G_MODULE_EXPORT void theme_init (GTypeModule *module) { unico_engine_register_types (module); } G_MODULE_EXPORT void theme_exit (void) { } G_MODULE_EXPORT GtkThemingEngine* create_engine (void) { return GTK_THEMING_ENGINE (g_object_new (UNICO_TYPE_ENGINE, "name", "unico", NULL)); } unico-1.0.3+14.04.20140109/unico/unico-engine.h0000644000015000001560000000401212263445534021034 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #ifndef UNICO_ENGINE_H #define UNICO_ENGINE_H #include #include "unico-types.h" G_BEGIN_DECLS #define UNICO_TYPE_ENGINE (unico_engine_get_type ()) #define UNICO_ENGINE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), UNICO_TYPE_ENGINE, UnicoEngine)) #define UNICO_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNICO_TYPE_ENGINE, UnicoEngineClass)) #define UNICO_IS_ENGINE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), UNICO_TYPE_ENGINE)) #define UNICO_IS_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNICO_TYPE_ENGINE)) #define UNICO_ENGINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNICO_TYPE_ENGINE, UnicoEngineClass)) typedef struct _UnicoEngine UnicoEngine; typedef struct _UnicoEngineClass UnicoEngineClass; struct _UnicoEngine { GtkThemingEngine parent_instance; UnicoStyleFunctions style_functions[UNICO_NUM_STYLES]; UnicoStyles style; }; struct _UnicoEngineClass { GtkThemingEngineClass parent_class; UnicoStyleFunctions style_functions[UNICO_NUM_STYLES]; }; G_GNUC_INTERNAL void unico_engine_register_types (GTypeModule *module); G_GNUC_INTERNAL GType unico_engine_get_type (void); G_END_DECLS #endif /* UNICO_ENGINE_H */ unico-1.0.3+14.04.20140109/unico/unico-cairo-support.c0000644000015000001560000001102212263445534022370 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #include #include #include "unico-cairo-support.h" #include "unico-support.h" #include "unico-types.h" void unico_cairo_round_rect (cairo_t *cr, gdouble x, gdouble y, gdouble width, gdouble height, gint radius, guint sides, GtkJunctionSides junction) { radius = CLAMP (radius, 0, MIN (width / 2, height / 2)); if (sides & SIDE_RIGHT) { if (radius == 0 || (junction & GTK_JUNCTION_CORNER_TOPRIGHT)) cairo_move_to (cr, x + width, y); else { cairo_new_sub_path (cr); cairo_arc (cr, x + width - radius, y + radius, radius, - G_PI / 4, 0); } if (radius == 0 || (junction & GTK_JUNCTION_CORNER_BOTTOMRIGHT)) cairo_line_to (cr, x + width, y + height); else cairo_arc (cr, x + width - radius, y + height - radius, radius, 0, G_PI / 4); } if (sides & SIDE_BOTTOM) { if (radius != 0 && ! (junction & GTK_JUNCTION_CORNER_BOTTOMRIGHT)) { if ((sides & SIDE_RIGHT) == 0) cairo_new_sub_path (cr); cairo_arc (cr, x + width - radius, y + height - radius, radius, G_PI / 4, G_PI / 2); } else if ((sides & SIDE_RIGHT) == 0) cairo_move_to (cr, x + width, y + height); if (radius == 0 || (junction & GTK_JUNCTION_CORNER_BOTTOMLEFT)) cairo_line_to (cr, x, y + height); else cairo_arc (cr, x + radius, y + height - radius, radius, G_PI / 2, 3 * (G_PI / 4)); } else cairo_move_to (cr, x, y + height); if (sides & SIDE_LEFT) { if (radius != 0 && ! (junction & GTK_JUNCTION_CORNER_BOTTOMLEFT)) { if ((sides & SIDE_BOTTOM) == 0) cairo_new_sub_path (cr); cairo_arc (cr, x + radius, y + height - radius, radius, 3 * (G_PI / 4), G_PI); } else if ((sides & SIDE_BOTTOM) == 0) cairo_move_to (cr, x, y + height); if (radius == 0 || (junction & GTK_JUNCTION_CORNER_TOPLEFT)) cairo_line_to (cr, x, y); else cairo_arc (cr, x + radius, y + radius, radius, G_PI, G_PI + G_PI / 4); } if (sides & SIDE_TOP) { if (radius != 0 && ! (junction & GTK_JUNCTION_CORNER_TOPLEFT)) { if ((sides & SIDE_LEFT) == 0) cairo_new_sub_path (cr); cairo_arc (cr, x + radius, y + radius, radius, 5 * (G_PI / 4), 3 * (G_PI / 2)); } else if ((sides & SIDE_LEFT) == 0) cairo_move_to (cr, x, y); if (radius == 0 || (junction & GTK_JUNCTION_CORNER_TOPRIGHT)) cairo_line_to (cr, x + width, y); else cairo_arc (cr, x + width - radius, y + radius, radius, 3 * (G_PI / 2), - G_PI / 4); } } void unico_cairo_round_rect_inner (cairo_t *cr, gdouble x, gdouble y, gdouble width, gdouble height, gint radius, guint sides, GtkJunctionSides junction) { gdouble line_width; line_width = cairo_get_line_width (cr); /* center the rounded rectangle using line_width */ unico_cairo_round_rect (cr, x + line_width / 2.0, y + line_width / 2.0, width - line_width, height - line_width, radius, sides, junction); } unico-1.0.3+14.04.20140109/unico/unico-draw.c0000644000015000001560000001450412263445534020526 0ustar pbuserpbgroup00000000000000/* The Unico Theming Engine for Gtk+. * Copyright (C) 2011 Canonical Ltd * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301, USA. * * Authored by Andrea Cimitan * */ #include #include #include #include "unico-cairo-support.h" #include "unico-draw.h" #include "unico-support.h" #include "unico-types.h" static gboolean draw_arrow_texture (GtkThemingEngine *engine, cairo_t *cr, gdouble angle, gdouble x, gdouble y, gdouble size) { GtkStateFlags state; GValue value = { 0, }; cairo_pattern_t *texture = NULL; cairo_surface_t *surface = NULL; gboolean retval = FALSE; state = gtk_theming_engine_get_state (engine); gtk_theming_engine_get_property (engine, "-unico-arrow-texture", state, &value); if (!G_VALUE_HOLDS_BOXED (&value)) return FALSE; texture = g_value_dup_boxed (&value); g_value_unset (&value); if (texture != NULL) cairo_pattern_get_surface (texture, &surface); if (surface != NULL) { cairo_save (cr); cairo_translate (cr, (gint) (x + size / 2), (gint) (y + size / 2)); cairo_rotate (cr, angle); cairo_set_source_surface (cr, surface, - cairo_image_surface_get_width (surface) / 2, - cairo_image_surface_get_height (surface) / 2); cairo_paint (cr); cairo_restore (cr); retval = TRUE; } if (texture != NULL) cairo_pattern_destroy (texture); return retval; } static void unico_draw_arrow (GtkThemingEngine *engine, cairo_t *cr, gdouble angle, gdouble x, gdouble y, gdouble size) { GtkStateFlags state; GdkRGBA color; gdouble size_reduction = 4; if (draw_arrow_texture (engine, cr, angle, x, y, size)) return; state = gtk_theming_engine_get_state (engine); gtk_theming_engine_get_color (engine, state, &color); cairo_save (cr); /* use floor function to adjust doubles */ y = floor (y); x = floor (x); size = floor (size); size -= size_reduction; cairo_translate (cr, size_reduction / 2, size_reduction / 2); cairo_translate (cr, x + (gint)(size / 2) - 0.5, y + (gint)(size / 2) + 0.5); cairo_rotate (cr, angle); cairo_move_to (cr, 0, - (gint)(size / 2)); cairo_line_to (cr, - (gint)(size / 2), (gint)(size / 4)); cairo_line_to (cr, (gint)(size / 2), (gint)(size / 4)); cairo_close_path (cr); cairo_set_source_rgba (cr, color.red, color.green, color.blue, color.alpha * 0.75); cairo_fill_preserve (cr); gdk_cairo_set_source_rgba (cr, &color); cairo_stroke (cr); cairo_restore (cr); } static void unico_draw_expander (DRAW_ARGS) { GtkStateFlags state; GdkRGBA color; gint size; gdouble angle = G_PI; state = gtk_theming_engine_get_state (engine); gtk_theming_engine_get_color (engine, state, &color); cairo_save (cr); /* use floor function to adjust doubles */ size = floor (MIN (width, height)); x += (gint) (width / 2) - size / 2; y += (gint) (height / 2) - size / 2; if ((state & GTK_STATE_FLAG_ACTIVE) == 0) angle = G_PI_2; cairo_translate (cr, x + (gint)(size / 2) - 0.5, y + (gint)(size / 2) + 0.5); cairo_rotate (cr, angle); cairo_move_to (cr, 0, - (gint)(size / 2)); cairo_line_to (cr, - (gint)(size / 2), (gint)(size / 4)); cairo_line_to (cr, (gint)(size / 2), (gint)(size / 4)); cairo_close_path (cr); cairo_set_source_rgba (cr, color.red, color.green, color.blue, color.alpha * 0.75); cairo_fill_preserve (cr); gdk_cairo_set_source_rgba (cr, &color); cairo_stroke (cr); cairo_restore (cr); } static void unico_draw_focus (DRAW_ARGS) { GdkRGBA *fill_color, *border_color; GtkStateFlags state; gint focus_pad, line_width; gint radius; state = gtk_theming_engine_get_state (engine); gtk_theming_engine_get_style (engine, "focus-padding", &focus_pad, "focus-line-width", &line_width, NULL); /* Skip rendering if focus-line-width is 0 or less. */ if (line_width < 1) return; /* Use the outline attributes for the focus properties to avoid using * custom attributes. Outlines don't have a fill, so hardcode the fill * color to be the same color as the border, but with 20% of its alpha. */ gtk_theming_engine_get (engine, state, "outline-color", &border_color, "outline-offset", &radius, NULL); fill_color = gdk_rgba_copy (border_color); fill_color->alpha = border_color->alpha * 0.2; x += focus_pad; y += focus_pad; width -= focus_pad * 2; height -= focus_pad * 2; cairo_save (cr); cairo_set_line_width (cr, line_width); /* first layer, background */ unico_cairo_round_rect (cr, x, y, width, height, radius, SIDE_ALL, GTK_JUNCTION_NONE); gdk_cairo_set_source_rgba (cr, fill_color); cairo_fill (cr); /* second layer, border */ unico_cairo_round_rect_inner (cr, x, y, width, height, radius, SIDE_ALL, GTK_JUNCTION_NONE); gdk_cairo_set_source_rgba (cr, border_color); cairo_stroke (cr); cairo_restore (cr); gdk_rgba_free (border_color); gdk_rgba_free (fill_color); } void unico_register_style_default (UnicoStyleFunctions *functions) { g_assert (functions); functions->draw_arrow = unico_draw_arrow; functions->draw_expander = unico_draw_expander; functions->draw_focus = unico_draw_focus; } unico-1.0.3+14.04.20140109/unico/Makefile.am0000644000015000001560000000112012263445534020334 0ustar pbuserpbgroup00000000000000source_h = \ $(srcdir)/unico.h \ $(srcdir)/unico-cairo-support.h \ $(srcdir)/unico-draw.h \ $(srcdir)/unico-engine.h \ $(srcdir)/unico-support.h \ $(srcdir)/unico-types.h source_c = \ $(srcdir)/unico-cairo-support.c \ $(srcdir)/unico-draw.c \ $(srcdir)/unico-engine.c \ $(srcdir)/unico-support.c \ $(srcdir)/unico-theme.c enginedir = $(libdir)/gtk-3.0/$(GTK_VERSION)/theming-engines engine_LTLIBRARIES = libunico.la libunico_la_SOURCES = $(source_h) $(source_c) libunico_la_CFLAGS = $(UNICO_CFLAGS) libunico_la_LIBADD = $(UNICO_LIBADD) libunico_la_LDFLAGS = $(UNICO_LDFLAGS) unico-1.0.3+14.04.20140109/po/0000755000015000001560000000000012263445654015612 5ustar pbuserpbgroup00000000000000unico-1.0.3+14.04.20140109/po/Makefile.in0000644000015000001560000001537712263445534017671 0ustar pbuserpbgroup00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # Copyright (C) 2004-2008 Rodney Dawes # # This file may be copied and used freely without restrictions. It may # be used in projects which are not available under a GNU Public License, # but which still want to provide support for the GNU gettext functionality. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # # - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ datarootdir = @datarootdir@ libdir = @libdir@ DATADIRNAME = @DATADIRNAME@ itlocaledir = $(prefix)/$(DATADIRNAME)/locale subdir = po install_sh = @install_sh@ # Automake >= 1.8 provides @mkdir_p@. # Until it can be supposed, use the safe fallback: mkdir_p = $(install_sh) -d INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) DISTFILES = Makefile.in.in POTFILES.in $(POFILES) EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS POTFILES = \ # This comment gets stripped out CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && gencat $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-data install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $$dir; \ if test -r $$lang.gmo; then \ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $(srcdir)/$$lang.gmo as" \ "$$dir/$(GETTEXT_PACKAGE).mo"; \ fi; \ if test -r $$lang.gmo.m; then \ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ if test -r $(srcdir)/$$lang.gmo.m ; then \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $(srcdir)/$$lang.gmo.m as" \ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ true; \ fi; \ fi; \ done # Empty stubs to satisfy archaic automake needs dvi info ctags tags CTAGS TAGS ID: # Define this as empty until I found a useful application. install-exec installcheck: uninstall: linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done check: all $(GETTEXT_PACKAGE).pot rm -f missing notexist srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m if [ -r missing -o -r notexist ]; then \ exit 1; \ fi mostlyclean: rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES stamp-it rm -f *.mo *.msg *.cat *.cat.m *.gmo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f Makefile.in.in distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ done; \ for file in $$dists; do \ test -f $$file || file="$(srcdir)/$$file"; \ ln $$file $(distdir) 2> /dev/null \ || cp -p $$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.gmo failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done Makefile POTFILES: stamp-it @if test ! -f $@; then \ rm -f stamp-it; \ $(MAKE) stamp-it; \ fi stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: unico-1.0.3+14.04.20140109/po/POTFILES.in0000644000015000001560000000000012263445534017352 0ustar pbuserpbgroup00000000000000unico-1.0.3+14.04.20140109/configure.ac0000644000015000001560000000666012263445534017467 0ustar pbuserpbgroup00000000000000AC_PREREQ(2.63) # Package AC_INIT([unico],[1.0.2],[https://bugs.launchpad.net/unico],[unico]) AC_CONFIG_SRCDIR([unico/unico.h]) AC_CONFIG_MACRO_DIR([build]) AC_CONFIG_AUX_DIR([build]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) NANO=`echo AC_PACKAGE_VERSION | cut -d'.' -f4` if test x"$NANO" = x || test "x$NANO" = "x0" ; then UNICO_TRUNK="no" PACKAGE_VERSION_NANO="0" else UNICO_TRUNK="yes" PACKAGE_VERSION_NANO="$NANO" fi AC_SUBST(UNICO_TRUNK) AC_SUBST(PACKAGE_VERSION_NANO) AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC AM_PROG_CC_C_O LT_INIT AC_C_CONST AC_C_INLINE # Build dependencies AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums]) AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) PKG_PROG_PKG_CONFIG AC_SUBST(glib_req, 2.26.0) AC_SUBST(gtk_req, 3.5.2) AC_SUBST(cairo_req, 1.10) PKG_CHECK_MODULES(DEPS, glib-2.0 >= $glib_req gtk+-3.0 >= $gtk_req cairo >= $cairo_req) AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) # Debug flags if test x$UNICO_TRUNK = xyes; then DEFAULT_DEBUG="yes" else DEFAULT_DEBUG="no" fi AC_SUBST(DEFAULT_DEBUG) AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug=@<:@no/yes/full@:>@],[Control debug level @<:@default=debug_default@:>@])], [], [enable_debug=$DEFAULT_DEBUG]) AS_CASE([$enable_debug], [yes], [ test "$cflags_set" = set || CFLAGS="$CFLAGS -g" DEBUG_CFLAGS="-D_DEBUG" ], [no], [DEBUG_CFLAGS="-DNDEBUG"], [AC_MSG_ERROR([Unknown argument for --enable-debug])] ) AC_SUBST(DEBUG_CFLAGS) # Maintainer flags if test x$UNICO_TRUNK = xyes; then DEFAULT_MAINTAINER_FLAGS="yes" else DEFAULT_MAINTAINER_FLAGS="no" fi AC_SUBST(DEFAULT_MAINTAINER_FLAGS) AC_ARG_ENABLE([maintainer-flags], [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],[Use strict compiler flags @<:@default=maintainer_flags_default@:>@])], [], [enable_maintainer_flags=$DEFAULT_MAINTAINER_FLAGS]) AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"], [ AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], ["-fno-common -Wall -Wextra -Werror -Wempty-body -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wno-unused-parameter -Wdeclaration-after-statement -Wpointer-arith -Wcast-align -Wwrite-strings -Wformat-security -Wformat-nonliteral -Winit-self -Wmissing-declarations -Wnested-externs -Wundef -Wold-style-definition -Wswitch-default -Wredundant-decls"]) ] ) AC_SUBST(MAINTAINER_CFLAGS) # Variables UNICO_LIBADD="\$(DEPS_LIBS)" AC_SUBST(UNICO_LIBADD) UNICO_CFLAGS="-I\$(top_srcdir) -DUNICO_COMPILATION \$(DEPS_CFLAGS) \$(DEBUG_CFLAGS) \$(MAINTAINER_CFLAGS)" AC_SUBST(UNICO_CFLAGS) UNICO_LDFLAGS="-module -avoid-version -no-undefined" AC_SUBST(UNICO_LDFLAGS) GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0` AC_SUBST(GTK_VERSION) # Files AC_CONFIG_FILES([ Makefile build/Makefile po/Makefile unico/Makefile ]) AC_OUTPUT # Summary echo "" echo " unico $PACKAGE_VERSION" echo " =========================" echo "" echo " Debug: ${enable_debug}" echo " Prefix: ${prefix}" echo "" echo " Compiler flags: ${CPPFLAGS} ${DEBUG_CFLAGS} ${MAINTAINER_CFLAGS}" echo "" unico-1.0.3+14.04.20140109/autogen.sh0000755000015000001560000000105712263445534017175 0ustar pbuserpbgroup00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. PKG_NAME="unico" (test -f $srcdir/unico/unico-theme.c) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level $PKG_NAME directory" exit 1 } which gnome-autogen.sh || { echo "You need to install gnome-common from the GNOME CVS" exit 1 } REQUIRED_AUTOCONF_VERSION=2.63 REQUIRED_AUTOMAKE_VERSION=1.9 REQUIRED_INTLTOOL_VERSION=0.40.0 REQUIRED_PKG_CONFIG_VERSION=0.16.0 . gnome-autogen.sh unico-1.0.3+14.04.20140109/COPYING0000644000015000001560000006363712263445534016243 0ustar pbuserpbgroup00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! unico-1.0.3+14.04.20140109/ChangeLog0000644000015000001560000000000012263445534016731 0ustar pbuserpbgroup00000000000000unico-1.0.3+14.04.20140109/AUTHORS0000644000015000001560000000047412263445534016246 0ustar pbuserpbgroup00000000000000Unico is a work by Andrea Cimitan This software would never exist without the precious work of: - Carlos Garnacho, for the Gtk+ CSS Style Context API - Benjamin Otte, for the help and the good snippets of code I've taken from Gtk+ - Cosimo Cecchi, for the help and the collaboration unico-1.0.3+14.04.20140109/Makefile.am0000644000015000001560000000073212263445534017227 0ustar pbuserpbgroup00000000000000SUBDIRS = \ build \ unico ACLOCAL_AMFLAGS = -I build EXTRA_DIST = autogen.sh COPYING DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper MAINTAINERCLEANFILES = \ build/compile \ build/config.guess \ build/config.sub \ build/depcomp \ build/install-sh \ build/ltmain.sh \ build/missing \ Makefile.in \ config.h.in \ configure \ aclocal.m4 release: dist make $(PACKAGE)-$(VERSION).tar.gz.md5 make $(PACKAGE)-$(VERSION).tar.bz2.md5 %.md5: % md5sum $< > $@