mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 12:00:31 +01:00
wrlib: new headers to contain definition of internal stuff
Using local function prototype redefinition is dangerous, now a single prototype is seen in all the files that are concerned. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
6c3cd08dad
commit
96a6e4da1e
@@ -33,11 +33,13 @@ libwraster_la_SOURCES = \
|
||||
context.c \
|
||||
misc.c \
|
||||
scale.c \
|
||||
scale.h \
|
||||
rotate.c \
|
||||
flip.c \
|
||||
convolve.c \
|
||||
save_xpm.c \
|
||||
xutil.c \
|
||||
xutil.h \
|
||||
load_ppm.c
|
||||
|
||||
if USE_GIF
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "wraster.h"
|
||||
#include "scale.h"
|
||||
|
||||
extern void _wraster_change_filter(int type);
|
||||
|
||||
static Bool bestContext(Display * dpy, int screen_number, RContext * context);
|
||||
|
||||
@@ -588,7 +588,7 @@ RContext *RCreateContext(Display * dpy, int screen_number, const RContextAttribu
|
||||
|
||||
/* get configuration from environment variables */
|
||||
gatherconfig(context, screen_number);
|
||||
_wraster_change_filter(context->attribs->scaling_filter);
|
||||
wraster_change_filter(context->attribs->scaling_filter);
|
||||
if ((context->attribs->flags & RC_VisualID)) {
|
||||
XVisualInfo *vinfo, templ;
|
||||
int nret;
|
||||
|
||||
@@ -35,12 +35,9 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "convert.h"
|
||||
#include "xutil.h"
|
||||
|
||||
|
||||
#ifdef USE_XSHM
|
||||
extern Pixmap R_CreateXImageMappedPixmap(RContext * context, RXImage * ximage);
|
||||
#endif
|
||||
|
||||
#define NFREE(n) if (n) free(n)
|
||||
|
||||
#define HAS_ALPHA(I) ((I)->format == RRGBAFormat)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "wraster.h"
|
||||
#include "scale.h"
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -246,7 +247,7 @@ static double Mitchell_filter(double t)
|
||||
static double (*filterf)(double) = Mitchell_filter;
|
||||
static double fwidth = Mitchell_support;
|
||||
|
||||
void _wraster_change_filter(int type)
|
||||
void wraster_change_filter(int type)
|
||||
{
|
||||
switch (type) {
|
||||
case RBoxFilter:
|
||||
|
||||
30
wrlib/scale.h
Normal file
30
wrlib/scale.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Raster graphics library
|
||||
*
|
||||
* Copyright (c) 2014 Window Maker Team
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef WRASTER_SCALE_H
|
||||
#define WRASTER_SCALE_H
|
||||
|
||||
|
||||
/*
|
||||
* Function to change the smoothing filter used for image scaling (RSmoothScaleImage)
|
||||
*/
|
||||
void wraster_change_filter(int type);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -36,6 +36,7 @@
|
||||
#endif /* USE_XSHM */
|
||||
|
||||
#include "wraster.h"
|
||||
#include "xutil.h"
|
||||
|
||||
#ifdef USE_XSHM
|
||||
|
||||
|
||||
29
wrlib/xutil.h
Normal file
29
wrlib/xutil.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Raster graphics library
|
||||
*
|
||||
* Copyright (c) 2014 Window Maker Team
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef WRASTER_XUTIL_H
|
||||
#define WRASTER_XUTIL_H
|
||||
|
||||
|
||||
#ifdef USE_XSHM
|
||||
Pixmap R_CreateXImageMappedPixmap(RContext *context, RXImage *ximage);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user