#include "copyright.h"
/*
-Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include "XMenuInt.h"
-
+#include <stdlib.h>
#ifdef EMACS_BITMAP_FILES
#include "../src/bitmaps/dimple1.xbm"
#include "../src/bitmaps/stipple.xbm"
#else
-#ifndef VMS
#include <X11/bitmaps/dimple1>
#include <X11/bitmaps/dimple3>
#include <X11/bitmaps/cntr_ptrmsk>
#include <X11/bitmaps/stipple>
-#else
-
-#include "[-.src.bitmaps]dimple1.xbm"
-#include "[-.src.bitmaps]dimple3.xbm"
-#include "[-.src.bitmaps]gray1.xbm"
-#include "[-.src.bitmaps]gray3.xbm"
-#include "[-.src.bitmaps]crosswv.xbm"
-
-#include "[-.src.bitmaps]leftptr.xbm"
-#include "[-.src.bitmaps]leftpmsk.xbm"
-#include "[-.src.bitmaps]rtptr.xbm"
-#include "[-.src.bitmaps]rtpmsk.xbm"
-#include "[-.src.bitmaps]cntrptr.xbm"
-#include "[-.src.bitmaps]cntrpmsk.xbm"
-#include "[-.src.bitmaps]stipple.xbm"
-
-#endif /* VMS */
#endif /* not EMACS_BITMAP_FILES */
#define DEF_FREEZE 0
#define DEF_MENU_STYLE LEFT
#define DEF_MENU_MODE BOX
#define DEF_INACT_PNUM 3
-#define MAX_INACT_PNUM 4
#define DEF_P_STYLE CENTER
#define XASSOC_TABLE_SIZE 64
-#define TILE_BUF_SIZE 5
-
-int atoi();
-double atof();
-char *x_get_resource_string ();
+char *x_get_resource_string (char const *, char const *);
static Status
-XAllocDisplayColor(display, map, colorName, color, junk)
- Display *display;
- Colormap map;
- char *colorName;
- XColor *color;
- XColor *junk;
+XAllocDisplayColor(Display *display, Colormap map, char const *colorName,
+ XColor *color, XColor *junk)
{
return (colorName!=0 &&
XParseColor(display, map, colorName, color) &&
XMenu *
-XMenuCreate(display, parent, def_env)
- Display *display; /* ID of previously opened display */
- Window parent; /* Window ID of the menu's parent window. */
- register char *def_env; /* X Defaults program environment name. */
+XMenuCreate(Display *display, Window parent, register char const *def_env)
+ /* ID of previously opened display */
+ /* Window ID of the menu's parent window. */
+ /* X Defaults program environment name. */
{
- register int i; /* Loop counter. */
- register int j; /* Loop counter. */
register char *def_val; /* X Default value temp variable. */
register XMenu *menu; /* Pointer to the new menu. */
int reverse; /* Reverse video mode. */
XMStyle p_style; /* Pane display style. */
- char *p_fnt_name; /* Flag font name. */
+ char const *p_fnt_name; /* Flag font name. */
XFontStruct *p_fnt_info; /* Flag font structure */
int p_fnt_pad; /* Flag font padding in pixels. */
double p_spread; /* Pane spread in flag height fractions. */
GC pane_GC; /* Pane graphics context. */
XMStyle s_style; /* Selection display style. */
- char *s_fnt_name; /* Selection font name. */
+ char const *s_fnt_name; /* Selection font name. */
XFontStruct *s_fnt_info; /* Selection font structure. */
int s_fnt_pad; /* Selection font padding in pixels. */
int s_fnt_height; /* Selection font character height */
GC inverse_select_GC; /* GC used for inverse video selection. */
GC inact_GC; /* GC for inactive pane header and */
/* selections. */
- GC inact_GC_noexpose;
XColor color_def; /* Temp color definition holder. */
- XColor screen_def; /* Temp screen color definition holder */
XColor p_bdr_color; /* Color of border. */
XColor s_bdr_color; /* Color of highlight. */
XColor p_frg_color; /* Color of pane foreground color. */
int inact_pnum; /* Inactive background pattern number. */
- Pixel p_bdr_pixel; /* Pane border pixel. */
- Pixel s_bdr_pixel; /* Selection border pixel. */
- Pixel p_frg_pixel; /* Pane foreground pixel. */
- Pixel s_frg_pixel; /* Selection foreground pixel. */
- Pixel bkgnd_pixel; /* Menu background pixel. */
-
- int *width, *height;
- Pixmap *bitmap;
- int *x_hot, *y_hot;
- int status; /* Return code from XReadBitmapFile. */
-
Pixmap cursor; /* Cursor pixmap holder. */
Pixmap cursor_mask; /* Cursor mask pixmap holder. */
Pixmap stipple_pixmap; /* Stipple mask for half-tone text. */
&mouse_color, &color_def)
);
- else ;
+ else {}
def_val = x_get_resource_string ("menuBackground", "MenuBackground");
if (
"white",
&bkgnd_color, &color_def)
);
- else;
+ else {}
def_val = x_get_resource_string ("menuInactivePattern", "MenuInactivePattern");
if (def_val != NULL) {
"black",
&s_frg_color, &color_def)
) ;
- else ;
+ else {}
def_val = x_get_resource_string ("selectionBorder", "SelectionBorder");
"black",
&s_bdr_color, &color_def)
) ;
- else ;
+ else {}
def_val = x_get_resource_string ("selectionBorderWidth", "SelectionBorderWidth");
if (def_val != NULL) s_bdr_width = atoi(def_val);
valuemask |= (GCGraphicsExposures);
values->graphics_exposures = False;
- inact_GC_noexpose = XCreateGC (display,
- root,
- valuemask, values);
/*
_XMErrorCode = XME_NO_ERROR;
return(menu);
}
-
-/* arch-tag: 6945b7d2-3b13-40b9-8b6e-56b1b20f3463
- (do not change this comment) */