Picture -> FvwmPicture, to avoid collisions with xrandr includes.

As noticed by Tristan Le Guern.
okay matthieu@
This commit is contained in:
espie 2011-01-18 19:28:33 +00:00
parent 8ec04c2727
commit f1ea238aa1
14 changed files with 43 additions and 43 deletions

View File

@ -565,7 +565,7 @@ void DrawButton(FvwmWindow *t, Window win, int w, int h,
{
register int type = bf->style & ButtonFaceTypeMask;
#ifdef PIXMAP_BUTTONS
Picture *p;
FvwmPicture *p;
int border = 0;
int width, height, x, y;
#endif

View File

@ -248,7 +248,7 @@ typedef struct FvwmWindow
#ifdef MINI_ICONS
char *mini_pixmap_file;
Picture *mini_icon;
FvwmPicture *mini_icon;
#endif
char *icon_bitmap_file;

View File

@ -1845,7 +1845,7 @@ void PaintEntry(MenuItem *mi)
void PaintSidePic(MenuRoot *mr)
{
GC ReliefGC, TextGC;
Picture *sidePic;
FvwmPicture *sidePic;
if (mr->sidePic)
sidePic = mr->sidePic;
@ -1968,7 +1968,7 @@ void PaintMenu(MenuRoot *mr, XEvent *pevent)
XRectangle bounds;
#ifdef PIXMAP_BUTTONS
Picture *p;
FvwmPicture *p;
int border = 0;
int width, height, x, y;
#endif
@ -2591,11 +2591,11 @@ void scanForColor(char *instring, Pixel *p, Bool *c, char identifier)
return;
}
void scanForPixmap(char *instring, Picture **p, char identifier)
void scanForPixmap(char *instring, FvwmPicture **p, char identifier)
{
char *tstart, *txt, *name;
int i;
Picture *pp;
FvwmPicture *pp;
extern char *IconPath;
extern char *PixmapPath;
#ifdef UGLY_WHEN_PIXMAPS_MISSING

View File

@ -87,7 +87,7 @@ typedef struct MenuFeel {
typedef struct MenuFace {
union {
#ifdef PIXMAP_BUTTONS
Picture *p;
FvwmPicture *p;
#endif
Pixel back;
#ifdef GRADIENT_BUTTONS
@ -114,7 +114,7 @@ typedef struct MenuLook {
} f;
char ReliefThickness;
char TitleUnderlines;
Picture *sidePic;
FvwmPicture *sidePic;
Pixel sideColor;
GC MenuGC;
GC MenuActiveGC;
@ -146,8 +146,8 @@ typedef struct MenuItem
struct MenuItem *prev; /* prev menu item */
char *item; /* the character string displayed on left*/
char *item2; /* the character string displayed on right*/
Picture *picture; /* Pixmap to show above label*/
Picture *lpicture; /* Pixmap to show to left of label */
FvwmPicture *picture; /* Pixmap to show above label*/
FvwmPicture *lpicture; /* Pixmap to show to left of label */
char *action; /* action to be performed */
short item_num; /* item number of this menu */
short x; /* x coordinate for text (item) */
@ -203,7 +203,7 @@ typedef struct MenuRoot
Bool backgroundset; /* is win background set for this menu ?? */
Bool in_use;
int func;
Picture *sidePic;
FvwmPicture *sidePic;
Pixel sideColor;
Bool colorize;
short xoffset;

View File

@ -137,7 +137,7 @@ typedef struct ButtonFace {
ButtonFaceStyle style;
union {
#ifdef PIXMAP_BUTTONS
Picture *p;
FvwmPicture *p;
#endif
Pixel back;
#ifdef GRADIENT_BUTTONS

View File

@ -11,7 +11,7 @@
Some of the logic comes from pixy2, so the copyright is below.
*/
/*
* $Id: Picture.c,v 1.1.1.1 2006/11/26 10:53:41 matthieu Exp $
* $Id: Picture.c,v 1.2 2011/01/18 19:28:33 espie Exp $
* Copyright 1996, Romano Giannetti. No guarantees or warantees or anything
* are provided or implied in any way whatsoever. Use this program at your
* own risk. Permission to use this program for any purpose is given,
@ -57,7 +57,7 @@ static double c400_distance(XColor *, XColor *); /* prototype */
#include "fvwmlib.h"
static Picture *PictureList=NULL;
static FvwmPicture *PictureList=NULL;
Colormap PictureCMap;
Display *PictureSaveDisplay; /* Save area for display pointer */
@ -71,17 +71,17 @@ void InitPictureCMap(Display *dpy,Window Root)
}
Picture *LoadPicture(Display *dpy,Window Root,char *path, int color_limit)
FvwmPicture *LoadPicture(Display *dpy,Window Root,char *path, int color_limit)
{
int l;
Picture *p;
FvwmPicture *p;
#ifdef XPM
XpmAttributes xpm_attributes;
int rc;
XpmImage my_image = {0};
#endif
p=(Picture*)safemalloc(sizeof(Picture));
p=(FvwmPicture*)safemalloc(sizeof(FvwmPicture));
p->count=1;
p->name=path;
p->next=NULL;
@ -123,11 +123,11 @@ Picture *LoadPicture(Display *dpy,Window Root,char *path, int color_limit)
return NULL;
}
Picture *GetPicture(Display *dpy,Window Root,char *IconPath,char *PixmapPath,
char *name, int color_limit)
FvwmPicture *GetPicture(Display *dpy,Window Root,char *IconPath,
char *PixmapPath, char *name, int color_limit)
{
char *path;
Picture *p;
FvwmPicture *p;
if(!(path=findIconFile(name,PixmapPath,R_OK)))
if(!(path=findIconFile(name,IconPath,R_OK)))
@ -138,11 +138,11 @@ Picture *GetPicture(Display *dpy,Window Root,char *IconPath,char *PixmapPath,
return p;
}
Picture *CachePicture(Display *dpy,Window Root,char *IconPath,char *PixmapPath,
FvwmPicture *CachePicture(Display *dpy,Window Root,char *IconPath,char *PixmapPath,
char *name, int color_limit)
{
char *path;
Picture *p=PictureList;
FvwmPicture *p=PictureList;
/* First find the full pathname */
#ifdef XPM
@ -186,9 +186,9 @@ Picture *CachePicture(Display *dpy,Window Root,char *IconPath,char *PixmapPath,
}
void DestroyPicture(Display *dpy,Picture *p)
void DestroyPicture(Display *dpy,FvwmPicture *p)
{
Picture *q=PictureList;
FvwmPicture *q=PictureList;
if (!p) /* bag out if NULL */
return;

View File

@ -121,14 +121,14 @@ typedef struct PictureThing
unsigned int width;
unsigned int height;
unsigned int count;
} Picture;
} FvwmPicture;
void InitPictureCMap(Display*,Window);
Picture *GetPicture(Display* dpy, Window Root, char* IconPath,
FvwmPicture *GetPicture(Display* dpy, Window Root, char* IconPath,
char* PixmapPath, char* name, int color_limit);
Picture *CachePicture(Display*,Window,char *iconpath,
FvwmPicture *CachePicture(Display*,Window,char *iconpath,
char *pixmappath,char*,int);
void DestroyPicture(Display*,Picture*);
void DestroyPicture(Display*,FvwmPicture*);
char *findIconFile(char *icon, char *pathlist, int type);
#ifdef XPM

View File

@ -1027,7 +1027,7 @@ void RedrawWindow(button_info *b)
/**
*** LoadIconFile()
**/
int LoadIconFile(char *s,Picture **p)
int LoadIconFile(char *s,FvwmPicture **p)
{
*p=CachePicture(Dpy,Root,iconPath,pixmapPath,s, save_color_limit);
if(*p)

View File

@ -108,7 +108,7 @@ struct container_info_struct
char *fore; /* b_Fore */
Pixel fc; /* b_Fore */
Pixel bc,hc,sc; /* b_Back && !b_IconBack */
Picture *backicon; /* b_Back && b_IconBack */
FvwmPicture *backicon; /* b_Back && b_IconBack */
ushort minx,miny; /* b_Size */
};
@ -138,9 +138,9 @@ struct button_info_struct
Window IconWin; /* b_Icon || b_Swallow */
Pixel fc; /* b_Fore */
Pixel bc,hc,sc; /* b_Back && !b_IconBack */
Picture *backicon; /* b_Back && b_IconBack */
FvwmPicture *backicon; /* b_Back && b_IconBack */
ushort minx,miny; /* b_Size */
Picture *icon; /* b_Icon */
FvwmPicture *icon; /* b_Icon */
byte swallow; /* b_Swallow */
byte swallow_mask; /* b_Swallow */

View File

@ -180,7 +180,7 @@ typedef struct win_data {
struct button *button;
/* stuff shadowed in the Button structure */
#ifdef MINI_ICONS
Picture pic;
FvwmPicture pic;
#endif
char *display_string; /* what gets shown in the manager window */
Uchar iconified, state;
@ -206,7 +206,7 @@ typedef struct button {
struct {
int dirty_flags;
#ifdef MINI_ICONS
Picture pic;
FvwmPicture pic;
#endif
WinData *win;
char *display_string;

View File

@ -55,7 +55,7 @@ typedef struct pager_window
Window icon_w;
Window icon_pixmap_w;
char *icon_name;
Picture mini_icon;
FvwmPicture mini_icon;
int pager_view_width;
int pager_view_height;
int icon_view_width;

View File

@ -44,7 +44,7 @@ extern int ShowCurrentDesk;
/* -------------------------------------------------------------------------
ButtonNew - Allocates and fills a new button structure
------------------------------------------------------------------------- */
Button *ButtonNew(char *title, Picture *p, int up)
Button *ButtonNew(char *title, FvwmPicture *p, int up)
{
Button *new;
@ -100,7 +100,7 @@ void UpdateArray(ButtonArray *array,int x,int y,int w, int h)
/******************************************************************************
AddButton - Allocate space for and add the button to the bottom
******************************************************************************/
int AddButton(ButtonArray *array, char *title, Picture *p, int up)
int AddButton(ButtonArray *array, char *title, FvwmPicture *p, int up)
{
Button *new;
@ -154,7 +154,7 @@ int UpdateButton(ButtonArray *array, int butnum, char *title, int up)
/* -------------------------------------------------------------------------
UpdateButtonPicture - Change the picture of a button
------------------------------------------------------------------------- */
int UpdateButtonPicture(ButtonArray *array, int butnum, Picture *p)
int UpdateButtonPicture(ButtonArray *array, int butnum, FvwmPicture *p)
{
Button *temp;
temp=find_n(array,butnum);

View File

@ -19,7 +19,7 @@ typedef struct button
char *truncate_title; /* valid only if truncatewidth > 0 */
int up, needsupdate, tw, set, truncatewidth;
struct button *next;
Picture p;
FvwmPicture p;
long desk;
} Button;
@ -33,12 +33,12 @@ typedef struct
#define MAX_COLOUR_SETS 4
/* Function Prototypes */
Button *ButtonNew(char *title, Picture *p, int up);
Button *ButtonNew(char *title, FvwmPicture *p, int up);
void InitArray(ButtonArray *array,int x,int y,int w,int h);
void UpdateArray(ButtonArray *array,int x,int y,int w, int h);
int AddButton(ButtonArray *array, char *title, Picture *p,int up);
int AddButton(ButtonArray *array, char *title, FvwmPicture *p,int up);
int UpdateButton(ButtonArray *array, int butnum, char *title, int up);
int UpdateButtonPicture(ButtonArray *array, int butnum, Picture *p);
int UpdateButtonPicture(ButtonArray *array, int butnum, FvwmPicture *p);
int UpdateButtonSet(ButtonArray *array, int butnum, int set);
void RemoveButton(ButtonArray *array, int butnum);
Button *find_n(ButtonArray *array, int n);

View File

@ -285,7 +285,7 @@ void ProcessMessage(unsigned long type,unsigned long *body)
char *name,*string;
static int current_focus=-1;
Picture p;
FvwmPicture p;
switch(type)
{