Commit 67981b18 authored by Cosimo Cecchi's avatar Cosimo Cecchi

modules: remove the pixbuf engine directory

This is not used anywhere, and is commented out of the build because it
doesn't compile. Time for some spring cleaning...
parent 4101adb7
......@@ -1890,8 +1890,6 @@ gtk/a11y/Makefile
gtk/native/Makefile
libgail-util/Makefile
modules/Makefile
modules/engines/Makefile
modules/engines/pixbuf/Makefile
modules/input/Makefile
modules/printbackends/Makefile
modules/printbackends/cups/Makefile
......
include $(top_srcdir)/Makefile.decl
SUBDIRS = input engines
SUBDIRS = input
if OS_UNIX
SUBDIRS += printbackends
......
include $(top_srcdir)/Makefile.decl
# the pixbuf engine needs to be ported to GtkThemingEngine
SUBDIRS = # pixbuf
DIST_SUBDIRS = pixbuf
-include $(top_srcdir)/git.mk
include $(top_srcdir)/Makefile.decl
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/gdk \
-I$(top_builddir)/gdk \
-DGDK_DISABLE_DEPRECATED \
$(GTK_DEP_CFLAGS)
LDADDS = \
$(GTK_DEP_LIBS) \
$(top_builddir)/gdk/libgdk-3.la \
$(top_builddir)/gtk/libgtk-3.la
enginedir = $(libdir)/gtk-3.0/$(GTK_BINARY_VERSION)/engines
engine_LTLIBRARIES = libpixmap.la
libpixmap_la_SOURCES = \
pixbuf-draw.c \
pixbuf-main.c \
pixbuf-render.c \
pixbuf-rc-style.c \
pixbuf-rc-style.h \
pixbuf-style.h \
pixbuf.h
libpixmap_la_LDFLAGS = -avoid-version -module $(no_undefined)
libpixmap_la_LIBADD = $(LDADDS)
-include $(top_srcdir)/git.mk
The code in this directory is a GTK+ theme engine based on the earlier
pixmap theme engine.
The config files are meant to be compatible, but instead of rendering
using Imlib, it renders using GdkPixbuf. This makes the memory
management much more understandable, and also allows us to use
GdkPixbuf's high quality scaling.
Most of the code was reworked/rewritten in the process to make it more
understandable and maintainable.
There are lots of bugs here, a considersable number of bugs. But it's
cleaned up a great deal from the older pixmap engine. Please don't
make it uglier again.
Owen Taylor <otaylor@redhat.com>
6 February 2000
\ No newline at end of file
This diff is collapsed.
/* GTK+ Pixbuf Engine
* Copyright (C) 1998-2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Written by Owen Taylor <otaylor@redhat.com>, based on code by
* Carsten Haitzler <raster@rasterman.com>
*/
#include "pixbuf.h"
#include "pixbuf-style.h"
#include "pixbuf-rc-style.h"
#include <gmodule.h>
G_MODULE_EXPORT void
theme_init (GTypeModule *module)
{
pixbuf_rc_style_register_type (module);
pixbuf_style_register_type (module);
}
G_MODULE_EXPORT void
theme_exit (void)
{
}
G_MODULE_EXPORT GtkRcStyle *
theme_create_rc_style (void)
{
return g_object_new (PIXBUF_TYPE_RC_STYLE, NULL);
}
/* The following function will be called by GTK+ when the module
* is loaded and checks to see if we are compatible with the
* version of GTK+ that loads us.
*/
G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module);
const gchar*
g_module_check_init (GModule *module)
{
return gtk_check_version (GTK_MAJOR_VERSION,
GTK_MINOR_VERSION,
GTK_MICRO_VERSION - GTK_INTERFACE_AGE);
}
This diff is collapsed.
/* GTK+ Pixbuf Engine
* Copyright (C) 1998-2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Written by Owen Taylor <otaylor@redhat.com>, based on code by
* Carsten Haitzler <raster@rasterman.com>
*/
#include <gtk/gtk.h>
typedef struct _PixbufRcStyle PixbufRcStyle;
typedef struct _PixbufRcStyleClass PixbufRcStyleClass;
extern G_GNUC_INTERNAL GType pixbuf_type_rc_style;
#define PIXBUF_TYPE_RC_STYLE pixbuf_type_rc_style
#define PIXBUF_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PIXBUF_TYPE_RC_STYLE, PixbufRcStyle))
#define PIXBUF_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIXBUF_TYPE_RC_STYLE, PixbufRcStyleClass))
#define PIXBUF_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PIXBUF_TYPE_RC_STYLE))
#define PIXBUF_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIXBUF_TYPE_RC_STYLE))
#define PIXBUF_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIXBUF_TYPE_RC_STYLE, PixbufRcStyleClass))
struct _PixbufRcStyle
{
GtkRcStyle parent_instance;
GList *img_list;
};
struct _PixbufRcStyleClass
{
GtkRcStyleClass parent_class;
};
G_GNUC_INTERNAL void pixbuf_rc_style_register_type (GTypeModule *module);
This diff is collapsed.
/* GTK+ Pixbuf Engine
* Copyright (C) 1998-2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Written by Owen Taylor <otaylor@redhat.com>, based on code by
* Carsten Haitzler <raster@rasterman.com>
*/
#include <gtk/gtk.h>
typedef struct _PixbufStyle PixbufStyle;
typedef struct _PixbufStyleClass PixbufStyleClass;
extern G_GNUC_INTERNAL GType pixbuf_type_style;
#define PIXBUF_TYPE_STYLE pixbuf_type_style
#define PIXBUF_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PIXBUF_TYPE_STYLE, PixbufStyle))
#define PIXBUF_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIXBUF_TYPE_STYLE, PixbufStyleClass))
#define PIXBUF_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PIXBUF_TYPE_STYLE))
#define PIXBUF_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIXBUF_TYPE_STYLE))
#define PIXBUF_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIXBUF_TYPE_STYLE, PixbufStyleClass))
struct _PixbufStyle
{
GtkStyle parent_instance;
};
struct _PixbufStyleClass
{
GtkStyleClass parent_class;
};
G_GNUC_INTERNAL void pixbuf_style_register_type (GTypeModule *module);
/* GTK+ Pixbuf Engine
* Copyright (C) 1998-2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Written by Owen Taylor <otaylor@redhat.com>, based on code by
* Carsten Haitzler <raster@rasterman.com>
*/
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
/* internals */
typedef struct _ThemeData ThemeData;
typedef struct _ThemeImage ThemeImage;
typedef struct _ThemeMatchData ThemeMatchData;
typedef struct _ThemePixbuf ThemePixbuf;
enum
{
TOKEN_IMAGE = G_TOKEN_LAST + 1,
TOKEN_FUNCTION,
TOKEN_FILE,
TOKEN_STRETCH,
TOKEN_RECOLORABLE,
TOKEN_BORDER,
TOKEN_DETAIL,
TOKEN_STATE,
TOKEN_SHADOW,
TOKEN_GAP_SIDE,
TOKEN_GAP_FILE,
TOKEN_GAP_BORDER,
TOKEN_GAP_START_FILE,
TOKEN_GAP_START_BORDER,
TOKEN_GAP_END_FILE,
TOKEN_GAP_END_BORDER,
TOKEN_OVERLAY_FILE,
TOKEN_OVERLAY_BORDER,
TOKEN_OVERLAY_STRETCH,
TOKEN_ARROW_DIRECTION,
TOKEN_EXPANDER_STYLE,
TOKEN_WINDOW_EDGE,
TOKEN_D_HLINE,
TOKEN_D_VLINE,
TOKEN_D_SHADOW,
TOKEN_D_POLYGON,
TOKEN_D_ARROW,
TOKEN_D_DIAMOND,
TOKEN_D_OVAL,
TOKEN_D_STRING,
TOKEN_D_BOX,
TOKEN_D_FLAT_BOX,
TOKEN_D_CHECK,
TOKEN_D_OPTION,
TOKEN_D_CROSS,
TOKEN_D_RAMP,
TOKEN_D_TAB,
TOKEN_D_SHADOW_GAP,
TOKEN_D_BOX_GAP,
TOKEN_D_EXTENSION,
TOKEN_D_FOCUS,
TOKEN_D_SLIDER,
TOKEN_D_ENTRY,
TOKEN_D_HANDLE,
TOKEN_D_STEPPER,
TOKEN_D_EXPANDER,
TOKEN_D_RESIZE_GRIP,
TOKEN_TRUE,
TOKEN_FALSE,
TOKEN_TOP,
TOKEN_UP,
TOKEN_BOTTOM,
TOKEN_DOWN,
TOKEN_LEFT,
TOKEN_RIGHT,
TOKEN_NORMAL,
TOKEN_ACTIVE,
TOKEN_PRELIGHT,
TOKEN_SELECTED,
TOKEN_INSENSITIVE,
TOKEN_NONE,
TOKEN_IN,
TOKEN_OUT,
TOKEN_ETCHED_IN,
TOKEN_ETCHED_OUT,
TOKEN_ORIENTATION,
TOKEN_HORIZONTAL,
TOKEN_VERTICAL,
TOKEN_COLLAPSED,
TOKEN_SEMI_COLLAPSED,
TOKEN_SEMI_EXPANDED,
TOKEN_EXPANDED,
TOKEN_NORTH_WEST,
TOKEN_NORTH,
TOKEN_NORTH_EAST,
TOKEN_WEST,
TOKEN_EAST,
TOKEN_SOUTH_WEST,
TOKEN_SOUTH,
TOKEN_SOUTH_EAST
};
typedef enum
{
COMPONENT_NORTH_WEST = 1 << 0,
COMPONENT_NORTH = 1 << 1,
COMPONENT_NORTH_EAST = 1 << 2,
COMPONENT_WEST = 1 << 3,
COMPONENT_CENTER = 1 << 4,
COMPONENT_EAST = 1 << 5,
COMPONENT_SOUTH_EAST = 1 << 6,
COMPONENT_SOUTH = 1 << 7,
COMPONENT_SOUTH_WEST = 1 << 8,
COMPONENT_ALL = 1 << 9
} ThemePixbufComponent;
typedef enum {
THEME_MATCH_GAP_SIDE = 1 << 0,
THEME_MATCH_ORIENTATION = 1 << 1,
THEME_MATCH_STATE = 1 << 2,
THEME_MATCH_SHADOW = 1 << 3,
THEME_MATCH_ARROW_DIRECTION = 1 << 4,
THEME_MATCH_EXPANDER_STYLE = 1 << 5,
THEME_MATCH_WINDOW_EDGE = 1 << 6
} ThemeMatchFlags;
typedef enum {
THEME_CONSTANT_ROWS = 1 << 0,
THEME_CONSTANT_COLS = 1 << 1,
THEME_MISSING = 1 << 2
} ThemeRenderHints;
struct _ThemePixbuf
{
gchar *filename;
GdkPixbuf *pixbuf;
gboolean stretch;
gint border_left;
gint border_right;
gint border_bottom;
gint border_top;
guint hints[3][3];
};
struct _ThemeMatchData
{
guint function; /* Mandatory */
gchar *detail;
ThemeMatchFlags flags;
GtkPositionType gap_side;
GtkOrientation orientation;
GtkStateType state;
GtkShadowType shadow;
GtkArrowType arrow_direction;
GtkExpanderStyle expander_style;
GdkWindowEdge window_edge;
};
struct _ThemeImage
{
guint refcount;
ThemePixbuf *background;
ThemePixbuf *overlay;
ThemePixbuf *gap_start;
ThemePixbuf *gap;
ThemePixbuf *gap_end;
gchar recolorable;
ThemeMatchData match_data;
};
G_GNUC_INTERNAL ThemePixbuf *theme_pixbuf_new (void);
G_GNUC_INTERNAL void theme_pixbuf_destroy (ThemePixbuf *theme_pb);
G_GNUC_INTERNAL void theme_clear_pixbuf (ThemePixbuf **theme_pb);
G_GNUC_INTERNAL void theme_pixbuf_set_filename (ThemePixbuf *theme_pb,
const char *filename);
G_GNUC_INTERNAL GdkPixbuf * theme_pixbuf_get_pixbuf (ThemePixbuf *theme_pb);
G_GNUC_INTERNAL void theme_pixbuf_set_border (ThemePixbuf *theme_pb,
gint left,
gint right,
gint top,
gint bottom);
G_GNUC_INTERNAL void theme_pixbuf_set_stretch (ThemePixbuf *theme_pb,
gboolean stretch);
G_GNUC_INTERNAL void theme_pixbuf_render (ThemePixbuf *theme_pb,
cairo_t *cr,
guint component_mask,
gboolean center,
gint dest_x,
gint dest_y,
gint dest_width,
gint dest_height);
extern GtkStyleClass pixmap_default_class;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment