eliminate dependency on X11/bitmaps
svn: r1721
This commit is contained in:
parent
e90572245c
commit
060f7c026c
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
#include <X11/IntrinsicP.h>
|
#include <X11/IntrinsicP.h>
|
||||||
#include <X11/StringDefs.h>
|
#include <X11/StringDefs.h>
|
||||||
#include <X11/bitmaps/gray>
|
#include "xwGray.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <wxtimeout.h>
|
#include <wxtimeout.h>
|
||||||
|
@ -160,7 +160,7 @@ static void create_arrowlightgc(self)Widget self;
|
||||||
values.stipple =
|
values.stipple =
|
||||||
XCreateBitmapFromData(XtDisplay(self),
|
XCreateBitmapFromData(XtDisplay(self),
|
||||||
RootWindowOfScreen(XtScreen(self)),
|
RootWindowOfScreen(XtScreen(self)),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ static void create_arrowdarkgc(self)Widget self;
|
||||||
values.stipple =
|
values.stipple =
|
||||||
XCreateBitmapFromData(XtDisplay(self),
|
XCreateBitmapFromData(XtDisplay(self),
|
||||||
RootWindowOfScreen(XtScreen(self)),
|
RootWindowOfScreen(XtScreen(self)),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,7 +359,7 @@ resource. It is the same routine as for the shadows in the XfwfFrame widget.
|
||||||
values.stipple =
|
values.stipple =
|
||||||
XCreateBitmapFromData(XtDisplay($),
|
XCreateBitmapFromData(XtDisplay($),
|
||||||
RootWindowOfScreen(XtScreen($)),
|
RootWindowOfScreen(XtScreen($)),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ resource. It is the same routine as for the shadows in the XfwfFrame widget.
|
||||||
values.stipple =
|
values.stipple =
|
||||||
XCreateBitmapFromData(XtDisplay($),
|
XCreateBitmapFromData(XtDisplay($),
|
||||||
RootWindowOfScreen(XtScreen($)),
|
RootWindowOfScreen(XtScreen($)),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,7 @@ resource. It is the same routine as for the shadows in the XfwfFrame widget.
|
||||||
|
|
||||||
@ The stipple for the shadows are loaded from a bitmap file.
|
@ The stipple for the shadows are loaded from a bitmap file.
|
||||||
|
|
||||||
@incl <X11/bitmaps/gray>
|
@incl "xwGray.h"
|
||||||
@incl <stdio.h>
|
@incl <stdio.h>
|
||||||
@incl <assert.h>
|
@incl <assert.h>
|
||||||
@incl <wxtimeout.h>
|
@incl <wxtimeout.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/Xmu/Converters.h>
|
#include <X11/Xmu/Converters.h>
|
||||||
#include <X11/Xmu/CharSet.h>
|
#include <X11/Xmu/CharSet.h>
|
||||||
#include <X11/bitmaps/gray>
|
#include "xwGray.h"
|
||||||
#include <./xwFrameP.h>
|
#include <./xwFrameP.h>
|
||||||
static void set_shadow(
|
static void set_shadow(
|
||||||
#if NeedFunctionPrototypes
|
#if NeedFunctionPrototypes
|
||||||
|
@ -842,7 +842,7 @@ Pixmap GetGray(self)Widget self;
|
||||||
{
|
{
|
||||||
if (!((XfwfFrameWidget)self)->xfwfFrame.gray) {
|
if (!((XfwfFrameWidget)self)->xfwfFrame.gray) {
|
||||||
((XfwfFrameWidget)self)->xfwfFrame.gray = XCreateBitmapFromData(XtDisplay(self), XtWindow(self),
|
((XfwfFrameWidget)self)->xfwfFrame.gray = XCreateBitmapFromData(XtDisplay(self), XtWindow(self),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
return ((XfwfFrameWidget)self)->xfwfFrame.gray;
|
return ((XfwfFrameWidget)self)->xfwfFrame.gray;
|
||||||
}
|
}
|
||||||
|
|
|
@ -820,7 +820,7 @@ used to compute the value of the |topShadowColor| relative to the
|
||||||
{
|
{
|
||||||
if (!$gray) {
|
if (!$gray) {
|
||||||
$gray = XCreateBitmapFromData(XtDisplay($), XtWindow($),
|
$gray = XCreateBitmapFromData(XtDisplay($), XtWindow($),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
return $gray;
|
return $gray;
|
||||||
}
|
}
|
||||||
|
@ -856,5 +856,5 @@ used to compute the value of the |topShadowColor| relative to the
|
||||||
|
|
||||||
@ The stipple for the shadows is loaded from a bitmap file.
|
@ The stipple for the shadows is loaded from a bitmap file.
|
||||||
|
|
||||||
@incl <X11/bitmaps/gray>
|
@incl "xwGray.h"
|
||||||
|
|
||||||
|
|
7
src/wxxt/src/XWidgets/xwGray.h
Normal file
7
src/wxxt/src/XWidgets/xwGray.h
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
/* Copied from X11/bitmaps/gray, because this is all we
|
||||||
|
need from xbitmaps, and X11/bitmaps is often not installed
|
||||||
|
these days. */
|
||||||
|
#define wx_gray_width 2
|
||||||
|
#define wx_gray_height 2
|
||||||
|
static char wx_gray_bits[] = {
|
||||||
|
0x01, 0x02};
|
|
@ -43,6 +43,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "wx_visual.h"
|
#include "wx_visual.h"
|
||||||
#include "wxAllocColor.h"
|
#include "wxAllocColor.h"
|
||||||
|
#include "xwGray.h"
|
||||||
|
|
||||||
extern int wxUseMenuHiliteBorder();
|
extern int wxUseMenuHiliteBorder();
|
||||||
|
|
||||||
|
@ -706,9 +707,8 @@ static void CreateGCs(MenuWidget mw)
|
||||||
XGCValues xgcv;
|
XGCValues xgcv;
|
||||||
int gcf_flag = 0;
|
int gcf_flag = 0;
|
||||||
|
|
||||||
# include <X11/bitmaps/gray>
|
|
||||||
mw->menu.stipple_pxmap = XCreatePixmapFromBitmapData(dpy, win,
|
mw->menu.stipple_pxmap = XCreatePixmapFromBitmapData(dpy, win,
|
||||||
gray_bits, gray_width, gray_height, 1, 0, 1);
|
wx_gray_bits, wx_gray_width, wx_gray_height, 1, 0, 1);
|
||||||
|
|
||||||
if (mw->menu.font) {
|
if (mw->menu.font) {
|
||||||
xgcv.font = mw->menu.font->fid;
|
xgcv.font = mw->menu.font->fid;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
#include <X11/IntrinsicP.h>
|
#include <X11/IntrinsicP.h>
|
||||||
#include <X11/StringDefs.h>
|
#include <X11/StringDefs.h>
|
||||||
#include <X11/bitmaps/gray>
|
#include "xwGray.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <./xwSlider2P.h>
|
#include <./xwSlider2P.h>
|
||||||
static void start(
|
static void start(
|
||||||
|
@ -201,7 +201,7 @@ static void create_thumblightgc(self)Widget self;
|
||||||
values.stipple =
|
values.stipple =
|
||||||
XCreateBitmapFromData(XtDisplay(self),
|
XCreateBitmapFromData(XtDisplay(self),
|
||||||
RootWindowOfScreen(XtScreen(self)),
|
RootWindowOfScreen(XtScreen(self)),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ static void create_thumbdarkgc(self)Widget self;
|
||||||
values.stipple =
|
values.stipple =
|
||||||
XCreateBitmapFromData(XtDisplay(self),
|
XCreateBitmapFromData(XtDisplay(self),
|
||||||
RootWindowOfScreen(XtScreen(self)),
|
RootWindowOfScreen(XtScreen(self)),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -673,7 +673,7 @@ parts of the thumb's frame.
|
||||||
values.stipple =
|
values.stipple =
|
||||||
XCreateBitmapFromData(XtDisplay($),
|
XCreateBitmapFromData(XtDisplay($),
|
||||||
RootWindowOfScreen(XtScreen($)),
|
RootWindowOfScreen(XtScreen($)),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,7 @@ thumb's frame.
|
||||||
values.stipple =
|
values.stipple =
|
||||||
XCreateBitmapFromData(XtDisplay($),
|
XCreateBitmapFromData(XtDisplay($),
|
||||||
RootWindowOfScreen(XtScreen($)),
|
RootWindowOfScreen(XtScreen($)),
|
||||||
gray_bits, gray_width, gray_height);
|
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -724,5 +724,5 @@ thumb's frame.
|
||||||
|
|
||||||
@imports
|
@imports
|
||||||
|
|
||||||
@incl <X11/bitmaps/gray>
|
@incl "xwGray.h"
|
||||||
@incl <stdio.h>
|
@incl <stdio.h>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user