mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 02:55:12 +00:00
Separate cairo-xlib.h Lua bindings from cairo.h (#1844)
- Separate cairo-xlib.h Lua bindings from cairo.h - This allows cairo.h to be used from Lua on Wayland without X11 as requirement. - Add pango dependency for Wayland (adds pangocairo). - Make graphics related bindings depend on BUILD_GUI. - Remove BUILD_GUI guard around options in platform checks. - Keeping only checks that **directly contain module requirements** A way of creating surfaces in Lua that uses Shm allocated buffers should be added in future. This commit only cleans up build options to avoid weird errors. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
This commit is contained in:
parent
c7df9c092e
commit
45500b1439
3
.github/workflows/build-and-test-linux.yaml
vendored
3
.github/workflows/build-and-test-linux.yaml
vendored
@ -87,7 +87,7 @@ jobs:
|
|||||||
lcov \
|
lcov \
|
||||||
libaudclient-dev \
|
libaudclient-dev \
|
||||||
libcairo2-dev \
|
libcairo2-dev \
|
||||||
libcurl4-gnutls-dev \
|
libpango1.0-dev \
|
||||||
libcurl4-gnutls-dev \
|
libcurl4-gnutls-dev \
|
||||||
libdbus-glib-1-dev \
|
libdbus-glib-1-dev \
|
||||||
libglib2.0-dev \
|
libglib2.0-dev \
|
||||||
@ -148,6 +148,7 @@ jobs:
|
|||||||
-DBUILD_IRC=ON \
|
-DBUILD_IRC=ON \
|
||||||
-DBUILD_JOURNAL=ON \
|
-DBUILD_JOURNAL=ON \
|
||||||
-DBUILD_LUA_CAIRO=ON \
|
-DBUILD_LUA_CAIRO=ON \
|
||||||
|
-DBUILD_LUA_CAIRO_XLIB=ON \
|
||||||
-DBUILD_LUA_IMLIB2=ON \
|
-DBUILD_LUA_IMLIB2=ON \
|
||||||
-DBUILD_LUA_RSVG=${RSVG_ENABLED} \
|
-DBUILD_LUA_RSVG=${RSVG_ENABLED} \
|
||||||
-DBUILD_MYSQL=ON \
|
-DBUILD_MYSQL=ON \
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -13,9 +13,6 @@ CMakeCache.txt
|
|||||||
CMakeFiles
|
CMakeFiles
|
||||||
data/convertconf.h
|
data/convertconf.h
|
||||||
data/defconfig.h
|
data/defconfig.h
|
||||||
lua/libcairo-orig.c
|
|
||||||
lua/libcairo.c
|
|
||||||
lua/libimlib2.c
|
|
||||||
*.so
|
*.so
|
||||||
*.a
|
*.a
|
||||||
/config.h
|
/config.h
|
||||||
|
@ -210,11 +210,18 @@ dependent_option(BUILD_MOUSE_EVENTS "Enable mouse event support" true
|
|||||||
"Mouse event support requires Wayland or OWN_WINDOW enabled")
|
"Mouse event support requires Wayland or OWN_WINDOW enabled")
|
||||||
|
|
||||||
# Lua library options
|
# Lua library options
|
||||||
option(BUILD_LUA_CAIRO "Build cairo bindings for Lua" false)
|
dependent_option(BUILD_LUA_CAIRO "Build cairo bindings for Lua" false
|
||||||
|
"BUILD_GUI" false
|
||||||
|
"Cairo Lua bindings depend on BUILD_GUI")
|
||||||
|
dependent_option(BUILD_LUA_CAIRO_XLIB "Build Imlib2 bindings for Lua" true
|
||||||
|
"BUILD_X11;BUILD_LUA_CAIRO" false
|
||||||
|
"Cairo Xlib Lua bindings require Cairo and X11")
|
||||||
dependent_option(BUILD_LUA_IMLIB2 "Build Imlib2 bindings for Lua" false
|
dependent_option(BUILD_LUA_IMLIB2 "Build Imlib2 bindings for Lua" false
|
||||||
"BUILD_X11;BUILD_IMLIB2" false
|
"BUILD_X11;BUILD_IMLIB2" false
|
||||||
"Imlib2 Lua bindings require X11 and Imlib2")
|
"Imlib2 Lua bindings require X11 and Imlib2")
|
||||||
option(BUILD_LUA_RSVG "Build rsvg bindings for Lua" false)
|
dependent_option(BUILD_LUA_RSVG "Build rsvg bindings for Lua" false
|
||||||
|
"BUILD_GUI" false
|
||||||
|
"RSVG Lua bindings depend on BUILD_GUI")
|
||||||
|
|
||||||
option(BUILD_AUDACIOUS "Build audacious (music player) support" false)
|
option(BUILD_AUDACIOUS "Build audacious (music player) support" false)
|
||||||
|
|
||||||
|
@ -472,6 +472,14 @@ if(BUILD_WAYLAND)
|
|||||||
set(conky_includes ${conky_includes} ${EPOLL_INCLUDE_DIRS})
|
set(conky_includes ${conky_includes} ${EPOLL_INCLUDE_DIRS})
|
||||||
endif(OS_DARWIN OR OS_DRAGONFLY OR OS_FREEBSD OR OS_NETBSD OR OS_OPENBSD)
|
endif(OS_DARWIN OR OS_DRAGONFLY OR OS_FREEBSD OR OS_NETBSD OR OS_OPENBSD)
|
||||||
|
|
||||||
|
pkg_check_modules(CAIRO REQUIRED cairo)
|
||||||
|
set(conky_libs ${conky_libs} ${CAIRO_LIBRARIES})
|
||||||
|
set(conky_includes ${conky_includes} ${CAIRO_INCLUDE_DIR})
|
||||||
|
|
||||||
|
pkg_check_modules(PANGO REQUIRED pango)
|
||||||
|
set(conky_libs ${conky_libs} ${PANGO_LIBRARIES})
|
||||||
|
set(conky_includes ${conky_includes} ${PANGO_INCLUDE_DIRS})
|
||||||
|
|
||||||
pkg_check_modules(PANGOCAIRO pangocairo)
|
pkg_check_modules(PANGOCAIRO pangocairo)
|
||||||
set(conky_libs ${conky_libs} ${PANGOCAIRO_LIBRARIES})
|
set(conky_libs ${conky_libs} ${PANGOCAIRO_LIBRARIES})
|
||||||
set(conky_includes ${conky_includes} ${PANGOCAIRO_INCLUDE_DIRS})
|
set(conky_includes ${conky_includes} ${PANGOCAIRO_INCLUDE_DIRS})
|
||||||
@ -491,34 +499,39 @@ set(conky_libs ${conky_libs} ${LUA_LIBRARIES})
|
|||||||
set(conky_includes ${conky_includes} ${LUA_INCLUDE_DIR})
|
set(conky_includes ${conky_includes} ${LUA_INCLUDE_DIR})
|
||||||
include_directories(3rdparty/toluapp/include)
|
include_directories(3rdparty/toluapp/include)
|
||||||
|
|
||||||
if(BUILD_GUI)
|
# Check for libraries used by Lua bindings
|
||||||
# Check for libraries used by Lua bindings
|
if(BUILD_LUA_CAIRO)
|
||||||
if(BUILD_LUA_CAIRO)
|
pkg_check_modules(CAIRO REQUIRED cairo>=1.14)
|
||||||
pkg_check_modules(CAIRO REQUIRED cairo>=1.14 cairo-xlib)
|
set(luacairo_libs ${CAIRO_LIBRARIES} ${LUA_LIBRARIES})
|
||||||
set(luacairo_libs ${CAIRO_LIBRARIES} ${LUA_LIBRARIES})
|
set(luacairo_includes ${CAIRO_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
||||||
set(luacairo_includes ${CAIRO_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
|
||||||
find_program(APP_PATCH patch)
|
|
||||||
|
|
||||||
if(NOT APP_PATCH)
|
if(BUILD_LUA_CAIRO_XLIB)
|
||||||
message(FATAL_ERROR "Unable to find program 'patch'")
|
pkg_check_modules(CAIROXLIB REQUIRED cairo-xlib)
|
||||||
endif(NOT APP_PATCH)
|
set(luacairo_libs ${CAIROXLIB_LIBRARIES} ${luacairo_libs})
|
||||||
endif(BUILD_LUA_CAIRO)
|
set(luacairo_includes ${CAIROXLIB_INCLUDE_DIRS} ${luacairo_includes})
|
||||||
|
endif(BUILD_LUA_CAIRO_XLIB)
|
||||||
|
|
||||||
|
find_program(APP_PATCH patch)
|
||||||
|
|
||||||
if(BUILD_X11 AND BUILD_LUA_IMLIB2)
|
if(NOT APP_PATCH)
|
||||||
pkg_search_module(IMLIB2 REQUIRED imlib2 Imlib2)
|
message(FATAL_ERROR "Unable to find program 'patch'")
|
||||||
set(luaimlib2_libs ${IMLIB2_LIBS} ${IMLIB2_LDFLAGS} ${LUA_LIBRARIES})
|
endif(NOT APP_PATCH)
|
||||||
set(luaimlib2_includes
|
endif(BUILD_LUA_CAIRO)
|
||||||
${IMLIB2_INCLUDE_DIRS}
|
|
||||||
${LUA_INCLUDE_DIR}
|
|
||||||
${X11_INCLUDE_DIR})
|
|
||||||
endif(BUILD_X11 AND BUILD_LUA_IMLIB2)
|
|
||||||
|
|
||||||
if(BUILD_LUA_RSVG)
|
if(BUILD_LUA_IMLIB2)
|
||||||
pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.52)
|
pkg_search_module(IMLIB2 REQUIRED imlib2 Imlib2)
|
||||||
set(luarsvg_libs ${RSVG_LIBRARIES} ${LUA_LIBRARIES})
|
set(luaimlib2_libs ${IMLIB2_LIBS} ${IMLIB2_LDFLAGS} ${LUA_LIBRARIES})
|
||||||
set(luarsvg_includes ${RSVG_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
set(luaimlib2_includes
|
||||||
endif(BUILD_LUA_RSVG)
|
${IMLIB2_INCLUDE_DIRS}
|
||||||
endif(BUILD_GUI)
|
${LUA_INCLUDE_DIR}
|
||||||
|
${X11_INCLUDE_DIR})
|
||||||
|
endif(BUILD_LUA_IMLIB2)
|
||||||
|
|
||||||
|
if(BUILD_LUA_RSVG)
|
||||||
|
pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.52)
|
||||||
|
set(luarsvg_libs ${RSVG_LIBRARIES} ${LUA_LIBRARIES})
|
||||||
|
set(luarsvg_includes ${RSVG_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
||||||
|
endif(BUILD_LUA_RSVG)
|
||||||
|
|
||||||
if(BUILD_AUDACIOUS)
|
if(BUILD_AUDACIOUS)
|
||||||
set(WANT_GLIB true)
|
set(WANT_GLIB true)
|
||||||
|
2
lua/.gitignore
vendored
Normal file
2
lua/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*.cc
|
||||||
|
cmake_install.cmake
|
@ -22,74 +22,91 @@ include(ToLua)
|
|||||||
|
|
||||||
add_definitions(-DTOLUA_RELEASE)
|
add_definitions(-DTOLUA_RELEASE)
|
||||||
|
|
||||||
if(BUILD_X11)
|
# NOTE: Don't chain options in IFs here, their dependency is already handled by
|
||||||
if(BUILD_LUA_CAIRO)
|
# ConkyBuildOptions.cmake
|
||||||
include_directories(${luacairo_includes} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
|
|
||||||
# Need the directory for -lSM
|
if(BUILD_LUA_CAIRO)
|
||||||
get_filename_component(X11_SM_LIB_PATH ${X11_SM_LIB} DIRECTORY)
|
include_directories(${luacairo_includes} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
link_directories(${X11_SM_LIB_PATH})
|
|
||||||
|
|
||||||
# cairo_set_dash() needs this special hack to work properly if you have a
|
# cairo_set_dash() needs this special hack to work properly if you have a
|
||||||
# better solution, please let me know
|
# better solution, please let me know
|
||||||
wrap_tolua(luacairo_src cairo.pkg libcairo.patch)
|
wrap_tolua(luacairo_src cairo.pkg libcairo.patch)
|
||||||
|
|
||||||
add_library(conky-cairo SHARED ${luacairo_src})
|
add_library(conky-cairo SHARED ${luacairo_src})
|
||||||
set_target_properties(conky-cairo PROPERTIES OUTPUT_NAME "cairo")
|
set_target_properties(conky-cairo PROPERTIES OUTPUT_NAME "cairo")
|
||||||
|
|
||||||
target_link_libraries(conky-cairo ${luacairo_libs} toluapp_lib_static)
|
target_link_libraries(conky-cairo ${luacairo_libs} toluapp_lib_static)
|
||||||
set(lua_libs ${lua_libs} conky-cairo)
|
set(lua_libs ${lua_libs} conky-cairo)
|
||||||
|
|
||||||
print_target_properties(conky-cairo)
|
print_target_properties(conky-cairo)
|
||||||
endif(BUILD_LUA_CAIRO)
|
endif(BUILD_LUA_CAIRO)
|
||||||
|
|
||||||
if(BUILD_LUA_IMLIB2)
|
if(BUILD_LUA_CAIRO_XLIB)
|
||||||
include_directories(${luaimlib2_includes} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src)
|
include_directories(${luacairoxlib_includes} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
if(IMLIB2_VERSION VERSION_GREATER_EQUAL "1.10.0")
|
# Need the directory for -lSM
|
||||||
wrap_tolua(luaimlib2_src imlib2.pkg)
|
get_filename_component(X11_SM_LIB_PATH ${X11_SM_LIB} DIRECTORY)
|
||||||
else(IMLIB2_VERSION VERSION_GREATER_EQUAL "1.10.0")
|
link_directories(${X11_SM_LIB_PATH})
|
||||||
wrap_tolua(luaimlib2_src imlib2_old.pkg)
|
wrap_tolua(luacairoxlib_src cairo_xlib.pkg)
|
||||||
endif(IMLIB2_VERSION VERSION_GREATER_EQUAL "1.10.0")
|
|
||||||
|
|
||||||
add_library(conky-imlib2 SHARED ${luaimlib2_src})
|
add_library(conky-cairo_xlib SHARED ${luacairoxlib_src})
|
||||||
set_target_properties(conky-imlib2 PROPERTIES OUTPUT_NAME "imlib2")
|
set_target_properties(conky-cairo_xlib PROPERTIES OUTPUT_NAME "cairo_xlib")
|
||||||
|
|
||||||
target_link_libraries(conky-imlib2 ${luaimlib2_libs} toluapp_lib_static)
|
target_link_libraries(conky-cairo_xlib
|
||||||
set(lua_libs ${lua_libs} conky-imlib2)
|
${luacairoxlib_libs}
|
||||||
|
${luacairo_libs}
|
||||||
|
toluapp_lib_static)
|
||||||
|
set(lua_libs ${lua_libs} conky-cairo_xlib)
|
||||||
|
|
||||||
print_target_properties(conky-imlib2)
|
print_target_properties(conky-cairo_xlib)
|
||||||
endif(BUILD_LUA_IMLIB2)
|
endif(BUILD_LUA_CAIRO_XLIB)
|
||||||
|
|
||||||
if(BUILD_LUA_RSVG)
|
if(BUILD_LUA_IMLIB2)
|
||||||
include_directories(${luarsvg_includes} ${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${luaimlib2_includes} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src)
|
||||||
wrap_tolua(luarsvg_src rsvg.pkg)
|
|
||||||
|
|
||||||
add_library(conky-rsvg SHARED ${luarsvg_src})
|
if(IMLIB2_VERSION VERSION_GREATER_EQUAL "1.10.0")
|
||||||
set_target_properties(conky-rsvg PROPERTIES OUTPUT_NAME "rsvg")
|
wrap_tolua(luaimlib2_src imlib2.pkg)
|
||||||
|
else(IMLIB2_VERSION VERSION_GREATER_EQUAL "1.10.0")
|
||||||
|
wrap_tolua(luaimlib2_src imlib2_old.pkg)
|
||||||
|
endif(IMLIB2_VERSION VERSION_GREATER_EQUAL "1.10.0")
|
||||||
|
|
||||||
target_link_libraries(conky-rsvg ${luarsvg_libs} toluapp_lib_static)
|
add_library(conky-imlib2 SHARED ${luaimlib2_src})
|
||||||
set(lua_libs ${lua_libs} conky-rsvg)
|
set_target_properties(conky-imlib2 PROPERTIES OUTPUT_NAME "imlib2")
|
||||||
|
|
||||||
print_target_properties(conky-rsvg)
|
target_link_libraries(conky-imlib2 ${luaimlib2_libs} toluapp_lib_static)
|
||||||
endif(BUILD_LUA_RSVG)
|
set(lua_libs ${lua_libs} conky-imlib2)
|
||||||
|
|
||||||
if(BUILD_LUA_CAIRO AND BUILD_LUA_IMLIB2)
|
print_target_properties(conky-imlib2)
|
||||||
include_directories(${luacairo_includes} ${luaimlib2_includes}
|
endif(BUILD_LUA_IMLIB2)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
wrap_tolua(luacairo_imlib2_helper_src cairo_imlib2_helper.pkg)
|
|
||||||
|
|
||||||
add_library(conky-cairo_imlib2_helper SHARED ${luacairo_imlib2_helper_src})
|
if(BUILD_LUA_IMLIB2)
|
||||||
set_target_properties(conky-cairo_imlib2_helper
|
include_directories(${luacairo_includes} ${luaimlib2_includes}
|
||||||
PROPERTIES OUTPUT_NAME "cairo_imlib2_helper")
|
${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
wrap_tolua(luacairo_imlib2_helper_src cairo_imlib2_helper.pkg)
|
||||||
|
|
||||||
target_link_libraries(conky-cairo_imlib2_helper
|
add_library(conky-cairo_imlib2_helper SHARED ${luacairo_imlib2_helper_src})
|
||||||
${luacairo_libs}
|
set_target_properties(conky-cairo_imlib2_helper
|
||||||
${luaimlib2_libs}
|
PROPERTIES OUTPUT_NAME "cairo_imlib2_helper")
|
||||||
toluapp_lib_static)
|
|
||||||
set(lua_libs ${lua_libs} conky-cairo_imlib2_helper)
|
target_link_libraries(conky-cairo_imlib2_helper
|
||||||
endif(BUILD_LUA_CAIRO AND BUILD_LUA_IMLIB2)
|
${luacairo_libs}
|
||||||
endif(BUILD_X11)
|
${luaimlib2_libs}
|
||||||
|
toluapp_lib_static)
|
||||||
|
set(lua_libs ${lua_libs} conky-cairo_imlib2_helper)
|
||||||
|
endif(BUILD_LUA_IMLIB2)
|
||||||
|
|
||||||
|
if(BUILD_LUA_RSVG)
|
||||||
|
include_directories(${luarsvg_includes} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
wrap_tolua(luarsvg_src rsvg.pkg)
|
||||||
|
|
||||||
|
add_library(conky-rsvg SHARED ${luarsvg_src})
|
||||||
|
set_target_properties(conky-rsvg PROPERTIES OUTPUT_NAME "rsvg")
|
||||||
|
|
||||||
|
target_link_libraries(conky-rsvg ${luarsvg_libs} toluapp_lib_static)
|
||||||
|
set(lua_libs ${lua_libs} conky-rsvg)
|
||||||
|
|
||||||
|
print_target_properties(conky-rsvg)
|
||||||
|
endif(BUILD_LUA_RSVG)
|
||||||
|
|
||||||
install(TARGETS ${lua_libs}
|
install(TARGETS ${lua_libs}
|
||||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}/conky
|
LIBRARY DESTINATION ${LIB_INSTALL_DIR}/conky
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
$#include <cairo-features.h>
|
$#include <cairo-features.h>
|
||||||
$#include <cairo-deprecated.h>
|
$#include <cairo-deprecated.h>
|
||||||
$#include <cairo.h>
|
$#include <cairo.h>
|
||||||
$#include <cairo-xlib.h>
|
|
||||||
$#include <X11/Xlib.h>
|
|
||||||
$#include <libcairo-helper.h>
|
$#include <libcairo-helper.h>
|
||||||
/*
|
/*
|
||||||
* This code was mostly copied from cairo.h and cairo-xlib.h with comments
|
* This code was mostly copied from cairo.h with comments removed. The
|
||||||
* removed. The licence noticed below is present for the sake of clarity.
|
* license notice below is present for the sake of clarity.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* cairo - a vector graphics library with display and print output
|
/* cairo - a vector graphics library with display and print output
|
||||||
@ -191,33 +189,6 @@ typedef enum _cairo_filter {
|
|||||||
CAIRO_FILTER_GAUSSIAN
|
CAIRO_FILTER_GAUSSIAN
|
||||||
} cairo_filter_t;
|
} cairo_filter_t;
|
||||||
|
|
||||||
cairo_surface_t *cairo_xlib_surface_create(Display * dpy,
|
|
||||||
Drawable drawable,
|
|
||||||
Visual * visual, int width, int height);
|
|
||||||
|
|
||||||
cairo_surface_t *cairo_xlib_surface_create_for_bitmap(Display * dpy,
|
|
||||||
Pixmap bitmap,
|
|
||||||
Screen * screen, int width, int height);
|
|
||||||
|
|
||||||
void cairo_xlib_surface_set_size(cairo_surface_t * surface, int width, int height);
|
|
||||||
|
|
||||||
void cairo_xlib_surface_set_drawable(cairo_surface_t * surface, Drawable
|
|
||||||
drawable, int width, int height);
|
|
||||||
|
|
||||||
Display *cairo_xlib_surface_get_display(cairo_surface_t * surface);
|
|
||||||
|
|
||||||
Drawable cairo_xlib_surface_get_drawable(cairo_surface_t * surface);
|
|
||||||
|
|
||||||
Screen *cairo_xlib_surface_get_screen(cairo_surface_t * surface);
|
|
||||||
|
|
||||||
Visual *cairo_xlib_surface_get_visual(cairo_surface_t * surface);
|
|
||||||
|
|
||||||
int cairo_xlib_surface_get_depth(cairo_surface_t * surface);
|
|
||||||
|
|
||||||
int cairo_xlib_surface_get_width(cairo_surface_t * surface);
|
|
||||||
|
|
||||||
int cairo_xlib_surface_get_height(cairo_surface_t * surface);
|
|
||||||
|
|
||||||
int cairo_version(void);
|
int cairo_version(void);
|
||||||
|
|
||||||
const char *cairo_version_string(void);
|
const char *cairo_version_string(void);
|
||||||
|
71
lua/cairo_xlib.pkg
Normal file
71
lua/cairo_xlib.pkg
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
$#include <cairo.h>
|
||||||
|
$#include <cairo-xlib.h>
|
||||||
|
$#include <X11/Xlib.h>
|
||||||
|
/*
|
||||||
|
* This code was mostly copied from cairo-xlib.h with comments removed. The
|
||||||
|
* license notice below is present for the sake of clarity.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* cairo - a vector graphics library with display and print output
|
||||||
|
*
|
||||||
|
* Copyright © 2002 University of Southern California
|
||||||
|
* Copyright © 2005 Red Hat, Inc.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it either under the terms of the GNU Lesser General Public
|
||||||
|
* License version 2.1 as published by the Free Software Foundation
|
||||||
|
* (the "LGPL") or, at your option, under the terms of the Mozilla
|
||||||
|
* Public License Version 1.1 (the "MPL"). If you do not alter this
|
||||||
|
* notice, a recipient may use your version of this file under either
|
||||||
|
* the MPL or the LGPL.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the LGPL along with this library
|
||||||
|
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
* You should have received a copy of the MPL along with this library
|
||||||
|
* in the file COPYING-MPL-1.1
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Mozilla Public License
|
||||||
|
* Version 1.1 (the "License"); you may not use this file except in
|
||||||
|
* compliance with the License. You may obtain a copy of the License at
|
||||||
|
* http://www.mozilla.org/MPL/
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
|
||||||
|
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
|
||||||
|
* the specific language governing rights and limitations.
|
||||||
|
*
|
||||||
|
* The Original Code is the cairo graphics library.
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is University of Southern
|
||||||
|
* California.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Carl D. Worth <cworth@cworth.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
cairo_surface_t *cairo_xlib_surface_create(Display * dpy,
|
||||||
|
Drawable drawable,
|
||||||
|
Visual * visual, int width, int height);
|
||||||
|
|
||||||
|
cairo_surface_t *cairo_xlib_surface_create_for_bitmap(Display * dpy,
|
||||||
|
Pixmap bitmap,
|
||||||
|
Screen * screen, int width, int height);
|
||||||
|
|
||||||
|
void cairo_xlib_surface_set_size(cairo_surface_t * surface, int width, int height);
|
||||||
|
|
||||||
|
void cairo_xlib_surface_set_drawable(cairo_surface_t * surface, Drawable
|
||||||
|
drawable, int width, int height);
|
||||||
|
|
||||||
|
Display *cairo_xlib_surface_get_display(cairo_surface_t * surface);
|
||||||
|
|
||||||
|
Drawable cairo_xlib_surface_get_drawable(cairo_surface_t * surface);
|
||||||
|
|
||||||
|
Screen *cairo_xlib_surface_get_screen(cairo_surface_t * surface);
|
||||||
|
|
||||||
|
Visual *cairo_xlib_surface_get_visual(cairo_surface_t * surface);
|
||||||
|
|
||||||
|
int cairo_xlib_surface_get_depth(cairo_surface_t * surface);
|
||||||
|
|
||||||
|
int cairo_xlib_surface_get_width(cairo_surface_t * surface);
|
||||||
|
|
||||||
|
int cairo_xlib_surface_get_height(cairo_surface_t * surface);
|
Loading…
Reference in New Issue
Block a user