forked from enlightenment/efl
commit
154f99de7f
|
@ -0,0 +1 @@
|
|||
The Rasterman (Carsten Haitzler) <raster@rasterman.com, raster@valinux.com>
|
|
@ -0,0 +1,20 @@
|
|||
Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies of the Software, its documentation and marketing & publicity
|
||||
materials, and acknowledgment shall be given in the documentation, materials
|
||||
and software packages that this Software was used.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
# A list of all the files in the current directory which can be regenerated
|
||||
MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 config.guess \
|
||||
config.h.in config.sub configure install-sh \
|
||||
ltconfig ltmain.sh missing mkinstalldirs \
|
||||
stamp-h.in
|
||||
|
||||
SUBDIRS = src test
|
||||
|
||||
EXTRA_DIST = README AUTHORS COPYING
|
|
@ -0,0 +1,25 @@
|
|||
-------------------------------------------------------------------------------
|
||||
E V A S - 0.0.0
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is the ``E Canvas'' - a rip off of some of the other canvas's floating
|
||||
about - Tk and gnome too. it's at the Xlib level. it's intended to be
|
||||
accelerated byhardware or highly optimised software where possible. It is
|
||||
intended to be simple and allow for the building of interfaces ontop of it.
|
||||
|
||||
if you got this from cvs do:
|
||||
./autogen.sh
|
||||
|
||||
otherwise do:
|
||||
./configure
|
||||
|
||||
then to compile:
|
||||
make
|
||||
|
||||
if you wish to install (as root):
|
||||
make install
|
||||
|
||||
in the test directory you will find a test program:
|
||||
cd test
|
||||
./evas_test
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
#! /bin/sh
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
THEDIR="`pwd`"
|
||||
cd "$srcdir"
|
||||
DIE=0
|
||||
|
||||
set -x
|
||||
autoheader
|
||||
libtoolize --ltdl --force --copy
|
||||
aclocal
|
||||
automake --foreign --add-missing
|
||||
autoconf
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
cd "$THEDIR"
|
||||
|
||||
$srcdir/configure "$@"
|
||||
|
||||
set +x
|
||||
|
||||
echo "Now type:"
|
||||
echo
|
||||
echo "make"
|
||||
echo "make install"
|
||||
echo
|
||||
echo "have fun."
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
AC_INIT(src/Evas.h)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(evas, 0.0.1)
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_C_CONST
|
||||
AM_ENABLE_SHARED
|
||||
AM_PROG_LIBTOOL
|
||||
AM_WITH_DMALLOC
|
||||
if test X"$enable_shared" = Xyes; then
|
||||
DLLDFLAGS=-export-dynamic
|
||||
AC_SUBST(DLLDFLAGS)
|
||||
fi
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
AC_CHECK_LIB(Imlib2, imlib_context_set_image, IMLIB2=yes ,[
|
||||
echo ""
|
||||
echo "ERROR: Imlib 2 needed"
|
||||
echo ""
|
||||
AC_MSG_ERROR([Fatal Error: no Imlib2 detected.])], -L/usr/X11R6/lib -L/usr/local/lib -lm -ldl -lttf -lX11 -lXext)
|
||||
AC_OUTPUT(Makefile src/Makefile test/Makefile)
|
|
@ -0,0 +1,159 @@
|
|||
#ifndef _EVAS_H
|
||||
#define _EVAS_H 1
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <Imlib2.h>
|
||||
|
||||
typedef struct _Evas * Evas;
|
||||
typedef struct _Evas_Gradient * Evas_Gradient;
|
||||
typedef void * Evas_Object;
|
||||
typedef void * Evas_Group;
|
||||
typedef int Evas_Callback_Type;
|
||||
typedef int Evas_Image_Format;
|
||||
typedef struct _Evas_List * Evas_List;
|
||||
|
||||
#define RENDER_METHOD_FASTEST 0
|
||||
#define RENDER_METHOD_BEST 1
|
||||
|
||||
struct _Evas
|
||||
{
|
||||
struct _state {
|
||||
Display *display;
|
||||
Drawable drawable;
|
||||
Visual *visual;
|
||||
Colormap colormap;
|
||||
|
||||
struct _output {
|
||||
int x, y, w, h;
|
||||
} output;
|
||||
|
||||
struct _viewport {
|
||||
double x, y, w, h;
|
||||
} viewport;
|
||||
|
||||
Evas_List *active_layers;
|
||||
|
||||
Evas_List *objects;
|
||||
|
||||
int render_method;
|
||||
|
||||
} current, previous;
|
||||
|
||||
/* externally provided updates for drawable relative rects */
|
||||
Evas_List *updates;
|
||||
};
|
||||
|
||||
struct _Evas_Gradient
|
||||
{
|
||||
Imlib_Color_Range color_range;
|
||||
};
|
||||
|
||||
struct _Evas_List
|
||||
{
|
||||
Evas_List *prev, *next;
|
||||
void *data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* create and destroy */
|
||||
Evas evas_new(void);
|
||||
void evas_free(Evas e);
|
||||
|
||||
/* for exposes or forced redraws (relative to output drawable) */
|
||||
void evas_update_rect(Evas e, int x, int y, int w, int h);
|
||||
|
||||
/* drawing */
|
||||
void evas_render(Evas e);
|
||||
|
||||
/* query for settings to use */
|
||||
Visual *evas_get_optimal_visual(Display *disp);
|
||||
Colormap evas_get_optimal_colormap(Display *disp);
|
||||
|
||||
/* the output settings */
|
||||
void evas_set_output(Evas e, Display *disp, Drawable d, Visual *v, Colormap c);
|
||||
void evas_set_output_rect(Evas e, int x, int y, int w, int h);
|
||||
void evas_set_viewport(Evas e, double x, double y, double w, double h);
|
||||
|
||||
/* deleting objects */
|
||||
void evas_del_object(Evas e, Evas_Object o);
|
||||
|
||||
/* adding objects */
|
||||
Evas_Object evas_add_image_from_file(Evas e, char *file);
|
||||
Evas_Object evas_add_image_from_data(Evas e, void *data, Evas_Image_Format format, int w, int h);
|
||||
Evas_Object evas_add_text(Evas e, char *font, int size, char *text);
|
||||
Evas_Object evas_add_rectangle(Evas e, int r, Evas_Group g, int b);
|
||||
Evas_Object evas_add_line(Evas e, int r, Evas_Group g, int b, int a);
|
||||
Evas_Object evas_add_gradient_box(Evas e);
|
||||
Evas_Object evas_add_bits(Evas e, char *file);
|
||||
Evas_Object evas_add_evas(Evas e, Evas evas);
|
||||
|
||||
/* set object settings */
|
||||
void evas_set_image_file(Evas e, Evas_Object o, char *file);
|
||||
void evas_set_image_fill_size(Evas e, Evas_Object o, double w, double h);
|
||||
void evas_set_bits_file(Evas e, Evas_Object o, char *file);
|
||||
void evas_set_color(Evas e, Evas_Object o, int r, Evas_Group g, int b, int a);
|
||||
void evas_set_gradient_angle(Evas e, Evas_Object o, double angle);
|
||||
void evas_set_gradient(Evas e, Evas_Object o, Evas_Gradient grad);
|
||||
void evas_set_angle(Evas e, Evas_Object o, double angle);
|
||||
void evas_set_blend_mode(Evas e, int mode);
|
||||
void evas_set_zoom_scale(Evas e, Evas_Object o, int scale);
|
||||
|
||||
/* layer stacking for object */
|
||||
void evas_set_layer(Evas e, Evas_Object o, int l);
|
||||
|
||||
/* gradient creating / deletion / modification */
|
||||
Evas_Gradient evas_gradient_new(void);
|
||||
void evas_gradient_free(Evas_Gradient grad);
|
||||
void evas_gradient_add_color(Evas_Gradient grad, int r, int g, int b, int a, int dist);
|
||||
|
||||
/* stacking within a layer */
|
||||
void evas_raise(Evas e, Evas_Object o);
|
||||
void evas_lower(Evas e, Evas_Object o);
|
||||
void evas_stack_above(Evas e, Evas_Object o, int above);
|
||||
void evas_stack_below(Evas e, Evas_Object o, int above);
|
||||
|
||||
/* object geoemtry */
|
||||
void evas_move(Evas e, Evas_Object o, double x, double y);
|
||||
void evas_resize(Evas e, Evas_Object o, double w, double h);
|
||||
void evas_get_geometry(Evas e, Evas_Object o, double *x, double *y, double *w, double *h);
|
||||
|
||||
/* object visibility */
|
||||
void evas_show(Evas e, Evas_Object o);
|
||||
void evas_hide(Evas e, Evas_Object o);
|
||||
|
||||
/* group operations */
|
||||
Evas_Group evas_add_group(Evas e);
|
||||
void evas_add_to_group(Evas e, Evas_Object o, Evas_Group g);
|
||||
void evas_disband_group(Evas e, Evas_Group g);
|
||||
void evas_del_from_group(Evas e, Evas_Object o, Evas_Group g);
|
||||
|
||||
/* evas bits ops */
|
||||
void evas_bits_get_padding(Evas e, Evas_Object o, double *l, double *r, double *t, double *b);
|
||||
void evas_bits_get_min(Evas e, Evas_Object o, double *w, double *h);
|
||||
void evas_bits_get_max(Evas e, Evas_Object o, double *w, double *h);
|
||||
void evas_bits_get_classed_bit_geoemtry(Evas e, Evas_Object o, char *class, double *x, double *y, double *w, double *h);
|
||||
|
||||
/* image query ops */
|
||||
void evas_get_image_size(Evas e, Evas_Object o, int *w, int *h);
|
||||
|
||||
/* events */
|
||||
void evas_event_button_down(Evas e, int x, int y, int b);
|
||||
void evas_event_button_up(Evas e, int x, int y, int b);
|
||||
void evas_event_move(Evas e, int x, int y);
|
||||
void evas_event_enter(Evas e);
|
||||
void evas_event_leave(Evas e);
|
||||
|
||||
/* callbacks */
|
||||
void evas_callback_add(Evas e, Evas_Object o, Evas_Callback_Type callback, void (*func) (void *_data, Evas _e, char *_class, Evas_Object _o, int _b, int _x, int _y), void *data);
|
||||
void evas_callback_del(Evas e, Evas_Object o, Evas_Callback_Type callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
# A list of all the files in the current directory which can be regenerated
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
LDFLAGS = -L/usr/X11R6/lib -L/usr/local/lib
|
||||
INCLUDES = -I/usr/X11R6/include -I/usr/local/include \
|
||||
$(X_CFLAGS) -I$(includedir) \
|
||||
-DLIBDIR=\"$(libdir)\" \
|
||||
-DBINDIR=\"$(bindir)\" \
|
||||
-DDATADIR=\"$(datadir)\"
|
||||
|
||||
lib_LTLIBRARIES = libevas.la
|
||||
include_HEADERS = \
|
||||
Evas.h
|
||||
|
||||
libevas_la_SOURCES = \
|
||||
evas_main.c \
|
||||
Evas.h
|
||||
|
||||
libevas_la_LIBADD = -lX11 -lXext -lttf -ldl -lm -lImlib2 $(LDFLAGS)
|
||||
libevas_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
libevas_la_LDFLAGS = -version-info 0:1:0
|
|
@ -0,0 +1,300 @@
|
|||
#include "Evas.h"
|
||||
|
||||
/* create and destroy */
|
||||
Evas
|
||||
evas_new(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_free(Evas e)
|
||||
{
|
||||
}
|
||||
|
||||
/* for exposes or forced redraws (relative to output drawable) */
|
||||
void
|
||||
evas_update_rect(Evas e, int x, int y, int w, int h)
|
||||
{
|
||||
}
|
||||
|
||||
/* drawing */
|
||||
void
|
||||
evas_render(Evas e)
|
||||
{
|
||||
}
|
||||
|
||||
/* query for settings to use */
|
||||
Visual *
|
||||
evas_get_optimal_visual(Display *disp)
|
||||
{
|
||||
}
|
||||
|
||||
Colormap
|
||||
evas_get_optimal_colormap(Display *disp)
|
||||
{
|
||||
}
|
||||
|
||||
/* the output settings */
|
||||
void
|
||||
evas_set_output(Evas e, Display *disp, Drawable d, Visual *v, Colormap c)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_output_rect(Evas e, int x, int y, int w, int h)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_viewport(Evas e, double x, double y, double w, double h)
|
||||
{
|
||||
}
|
||||
|
||||
/* deleting objects */
|
||||
void
|
||||
evas_del_object(Evas e, Evas_Object o)
|
||||
{
|
||||
}
|
||||
|
||||
/* adding objects */
|
||||
Evas_Object
|
||||
evas_add_image_from_file(Evas e, char *file)
|
||||
{
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_image_from_data(Evas e, void *data, Evas_Image_Format format, int w, int h)
|
||||
{
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_text(Evas e, char *font, int size, char *text)
|
||||
{
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_rectangle(Evas e, int r, Evas_Group g, int b)
|
||||
{
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_line(Evas e, int r, Evas_Group g, int b, int a)
|
||||
{
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_gradient_box(Evas e)
|
||||
{
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_bits(Evas e, char *file)
|
||||
{
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_evas(Evas e, Evas evas)
|
||||
{
|
||||
}
|
||||
|
||||
/* set object settings */
|
||||
void
|
||||
evas_set_image_file(Evas e, Evas_Object o, char *file)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_image_fill_size(Evas e, Evas_Object o, double w, double h)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_bits_file(Evas e, Evas_Object o, char *file)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_color(Evas e, Evas_Object o, int r, Evas_Group g, int b, int a)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_gradient_angle(Evas e, Evas_Object o, double angle)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_gradient(Evas e, Evas_Object o, Evas_Gradient grad)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_angle(Evas e, Evas_Object o, double angle)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_blend_mode(Evas e, int mode)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_zoom_scale(Evas e, Evas_Object o, int scale)
|
||||
{
|
||||
}
|
||||
|
||||
/* layer stacking for object */
|
||||
void
|
||||
evas_set_layer(Evas e, Evas_Object o, int l)
|
||||
{
|
||||
}
|
||||
|
||||
/* gradient creating / deletion / modification */
|
||||
Evas_Gradient
|
||||
evas_gradient_new(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_gradient_free(Evas_Gradient grad)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_gradient_add_color(Evas_Gradient grad, int r, int g, int b, int a, int dist)
|
||||
{
|
||||
}
|
||||
|
||||
/* stacking within a layer */
|
||||
void
|
||||
evas_raise(Evas e, Evas_Object o)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_lower(Evas e, Evas_Object o)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_stack_above(Evas e, Evas_Object o, int above)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_stack_below(Evas e, Evas_Object o, int above)
|
||||
{
|
||||
}
|
||||
|
||||
/* object geoemtry */
|
||||
void
|
||||
evas_move(Evas e, Evas_Object o, double x, double y)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_resize(Evas e, Evas_Object o, double w, double h)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_get_geometry(Evas e, Evas_Object o, double *x, double *y, double *w, double *h)
|
||||
{
|
||||
}
|
||||
|
||||
/* object visibility */
|
||||
void
|
||||
evas_show(Evas e, Evas_Object o)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_hide(Evas e, Evas_Object o)
|
||||
{
|
||||
}
|
||||
|
||||
/* group operations */
|
||||
Evas_Group
|
||||
evas_add_group(Evas e)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_add_to_group(Evas e, Evas_Object o, Evas_Group g)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_disband_group(Evas e, Evas_Group g)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_del_from_group(Evas e, Evas_Object o, Evas_Group g)
|
||||
{
|
||||
}
|
||||
|
||||
/* evas bits ops */
|
||||
void
|
||||
evas_bits_get_padding(Evas e, Evas_Object o, double *l, double *r, double *t, double *b)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_bits_get_min(Evas e, Evas_Object o, double *w, double *h)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_bits_get_max(Evas e, Evas_Object o, double *w, double *h)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_bits_get_classed_bit_geoemtry(Evas e, Evas_Object o, char *class, double *x, double *y, double *w, double *h)
|
||||
{
|
||||
}
|
||||
|
||||
/* image query ops */
|
||||
void
|
||||
evas_get_image_size(Evas e, Evas_Object o, int *w, int *h)
|
||||
{
|
||||
}
|
||||
|
||||
/* events */
|
||||
void
|
||||
evas_event_button_down(Evas e, int x, int y, int b)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_button_up(Evas e, int x, int y, int b)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_move(Evas e, int x, int y)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_enter(Evas e)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_leave(Evas e)
|
||||
{
|
||||
}
|
||||
|
||||
/* callbacks */
|
||||
void
|
||||
evas_callback_add(Evas e, Evas_Object o, Evas_Callback_Type callback, void (*func) (void *_data, Evas _e, char *_class, Evas_Object _o, int _b, int _x, int _y), void *data)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
evas_callback_del(Evas e, Evas_Object o, Evas_Callback_Type callback)
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
INCLUDES = \
|
||||
-I$(top_srcdir)/src -I/usr/local/include
|
||||
|
||||
noinst_PROGRAMS = evas_test
|
||||
|
||||
evas_test_DEPENDENCIES = $(top_srcdir)/src/libevas.la
|
||||
|
||||
evas_test_SOURCES = evas_test.c
|
||||
|
||||
evas_test_LDFLAGS = -static
|
||||
|
||||
evas_test_LDADD = $(top_builddir)/src/libevas.la -lImlib2 -lttf -lX11 -lXext -ldl
|
|
@ -0,0 +1,6 @@
|
|||
#include <Evas.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue