forked from enlightenment/efl
parent
1131ec1e34
commit
d8564cc917
|
@ -0,0 +1,33 @@
|
|||
## 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 =
|
||||
INCLUDES = @freetype_cflags@ @x_cflags@ @CAIRO_CFLAGS@ \
|
||||
-I. \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-I$(top_srcdir)/src/lib/include
|
||||
|
||||
if BUILD_ENGINE_CAIRO_X11
|
||||
|
||||
noinst_LTLIBRARIES = libevas_engine_cairo_x11.la
|
||||
libevas_engine_cairo_x11_la_SOURCES = \
|
||||
evas_engine.h \
|
||||
evas_engine.c \
|
||||
evas_x_main.c
|
||||
|
||||
libevas_engine_cairo_x11_la_LIBADD = \
|
||||
@x_libs@ @CAIRO_LIBS@ $(LDFLAGS)
|
||||
|
||||
libevas_engine_cairo_x11_la_DEPENDENCIES = \
|
||||
$(top_builddir)/config.h
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
evas_engine.h \
|
||||
evas_engine.c \
|
||||
evas_x_main.c
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,34 @@
|
|||
#ifndef EVAS_ENGINE_H
|
||||
#define EVAS_ENGINE_H
|
||||
|
||||
#include "evas_cairo_common.h"
|
||||
|
||||
typedef struct _Evas_Cairo_X11_Window Evas_Cairo_X11_Window;
|
||||
|
||||
struct _Evas_Cairo_X11_Window
|
||||
{
|
||||
Display *disp;
|
||||
Window win;
|
||||
int w, h;
|
||||
int screen;
|
||||
Visual *visual;
|
||||
Colormap colormap;
|
||||
int depth;
|
||||
cairo_t *cairo;
|
||||
};
|
||||
|
||||
Evas_Cairo_X11_Window *
|
||||
evas_engine_cairo_x11_window_new(Display *disp,
|
||||
Window win,
|
||||
int screen,
|
||||
Visual *vis,
|
||||
Colormap cmap,
|
||||
int depth,
|
||||
int w,
|
||||
int h);
|
||||
void
|
||||
evas_engine_cairo_x11_window_free(Evas_Cairo_X11_Window *cw);
|
||||
void
|
||||
evas_engine_cairo_x11_window_use(Evas_Cairo_X11_Window *cw);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,52 @@
|
|||
#include "evas_common.h"
|
||||
#include "evas_private.h"
|
||||
#include "evas_engine.h"
|
||||
#include "evas_engine_api_cairo_x11.h"
|
||||
#include "Evas.h"
|
||||
#include "Evas_Engine_Cairo_X11.h"
|
||||
#include "evas_cairo_common.h"
|
||||
|
||||
static Evas_Cairo_X11_Window *_evas_cairo_x11_window = NULL;
|
||||
|
||||
Evas_Cairo_X11_Window *
|
||||
evas_engine_cairo_x11_window_new(Display *disp,
|
||||
Window win,
|
||||
int screen,
|
||||
Visual *vis,
|
||||
Colormap cmap,
|
||||
int depth,
|
||||
int w,
|
||||
int h)
|
||||
{
|
||||
Evas_Cairo_X11_Window *cw;
|
||||
|
||||
cw = calloc(1, sizeof(Evas_Cairo_X11_Window));
|
||||
if (!cw) return NULL;
|
||||
cw->disp = disp;
|
||||
cw->win = win;
|
||||
cw->screen = screen;
|
||||
cw->visual = vis;
|
||||
cw->colormap = cmap;
|
||||
cw->depth = depth;
|
||||
cw->cairo = cairo_create();
|
||||
// evas_gl_common_context_resize(gw->gl_context, w, h);
|
||||
return cw;
|
||||
}
|
||||
|
||||
void
|
||||
evas_engine_cairo_x11_window_free(Evas_Cairo_X11_Window *cw)
|
||||
{
|
||||
if (cw == _evas_cairo_x11_window) _evas_cairo_x11_window = NULL;
|
||||
cairo_destroy(cw->cairo);
|
||||
free(cw);
|
||||
}
|
||||
|
||||
void
|
||||
evas_engine_cairo_x11_window_use(Evas_Cairo_X11_Window *cw)
|
||||
{
|
||||
if (_evas_cairo_x11_window != cw)
|
||||
{
|
||||
_evas_cairo_x11_window = cw;
|
||||
}
|
||||
// evas_gl_common_context_use(cw->gl_context);
|
||||
}
|
Loading…
Reference in New Issue