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/StringDefs.h>
|
||||
#include <X11/bitmaps/gray>
|
||||
#include "xwGray.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <wxtimeout.h>
|
||||
|
@ -160,7 +160,7 @@ static void create_arrowlightgc(self)Widget self;
|
|||
values.stipple =
|
||||
XCreateBitmapFromData(XtDisplay(self),
|
||||
RootWindowOfScreen(XtScreen(self)),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ static void create_arrowdarkgc(self)Widget self;
|
|||
values.stipple =
|
||||
XCreateBitmapFromData(XtDisplay(self),
|
||||
RootWindowOfScreen(XtScreen(self)),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -359,7 +359,7 @@ resource. It is the same routine as for the shadows in the XfwfFrame widget.
|
|||
values.stipple =
|
||||
XCreateBitmapFromData(XtDisplay($),
|
||||
RootWindowOfScreen(XtScreen($)),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ resource. It is the same routine as for the shadows in the XfwfFrame widget.
|
|||
values.stipple =
|
||||
XCreateBitmapFromData(XtDisplay($),
|
||||
RootWindowOfScreen(XtScreen($)),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
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.
|
||||
|
||||
@incl <X11/bitmaps/gray>
|
||||
@incl "xwGray.h"
|
||||
@incl <stdio.h>
|
||||
@incl <assert.h>
|
||||
@incl <wxtimeout.h>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <X11/Xmu/Converters.h>
|
||||
#include <X11/Xmu/CharSet.h>
|
||||
#include <X11/bitmaps/gray>
|
||||
#include "xwGray.h"
|
||||
#include <./xwFrameP.h>
|
||||
static void set_shadow(
|
||||
#if NeedFunctionPrototypes
|
||||
|
@ -842,7 +842,7 @@ Pixmap GetGray(self)Widget self;
|
|||
{
|
||||
if (!((XfwfFrameWidget)self)->xfwfFrame.gray) {
|
||||
((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;
|
||||
}
|
||||
|
|
|
@ -820,7 +820,7 @@ used to compute the value of the |topShadowColor| relative to the
|
|||
{
|
||||
if (!$gray) {
|
||||
$gray = XCreateBitmapFromData(XtDisplay($), XtWindow($),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
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.
|
||||
|
||||
@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 "wxAllocColor.h"
|
||||
#include "xwGray.h"
|
||||
|
||||
extern int wxUseMenuHiliteBorder();
|
||||
|
||||
|
@ -706,9 +707,8 @@ static void CreateGCs(MenuWidget mw)
|
|||
XGCValues xgcv;
|
||||
int gcf_flag = 0;
|
||||
|
||||
# include <X11/bitmaps/gray>
|
||||
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) {
|
||||
xgcv.font = mw->menu.font->fid;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
#include <X11/IntrinsicP.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include <X11/bitmaps/gray>
|
||||
#include "xwGray.h"
|
||||
#include <stdio.h>
|
||||
#include <./xwSlider2P.h>
|
||||
static void start(
|
||||
|
@ -201,7 +201,7 @@ static void create_thumblightgc(self)Widget self;
|
|||
values.stipple =
|
||||
XCreateBitmapFromData(XtDisplay(self),
|
||||
RootWindowOfScreen(XtScreen(self)),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ static void create_thumbdarkgc(self)Widget self;
|
|||
values.stipple =
|
||||
XCreateBitmapFromData(XtDisplay(self),
|
||||
RootWindowOfScreen(XtScreen(self)),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -673,7 +673,7 @@ parts of the thumb's frame.
|
|||
values.stipple =
|
||||
XCreateBitmapFromData(XtDisplay($),
|
||||
RootWindowOfScreen(XtScreen($)),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ thumb's frame.
|
|||
values.stipple =
|
||||
XCreateBitmapFromData(XtDisplay($),
|
||||
RootWindowOfScreen(XtScreen($)),
|
||||
gray_bits, gray_width, gray_height);
|
||||
wx_gray_bits, wx_gray_width, wx_gray_height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -724,5 +724,5 @@ thumb's frame.
|
|||
|
||||
@imports
|
||||
|
||||
@incl <X11/bitmaps/gray>
|
||||
@incl "xwGray.h"
|
||||
@incl <stdio.h>
|
||||
|
|
Loading…
Reference in New Issue
Block a user