author | Claus Gittinger <cg@exept.de> |
Mon, 22 Jul 2019 13:56:23 +0200 | |
changeset 8743 | 140d90ad0ec1 |
parent 8357 | f1060ceb2b3c |
permissions | -rw-r--r-- |
8357
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
2 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
3 |
" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
4 |
COPYRIGHT (c) 1989 by Claus Gittinger |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
5 |
All Rights Reserved |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
6 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
7 |
This software is furnished under a license and may be used |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
8 |
only in accordance with the terms of that license and with the |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
9 |
inclusion of the above copyright notice. This software may not |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
10 |
be provided or otherwise made available to, or used by, any |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
11 |
other person. No title to or ownership of the software is |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
12 |
hereby transferred. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
13 |
" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
14 |
"{ Package: 'stx:libview' }" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
15 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
16 |
"{ NameSpace: Smalltalk }" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
17 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
18 |
DeviceGraphicsContext subclass:#X11GraphicsContext |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
19 |
instanceVariableNames:'depth xftDrawId' |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
20 |
classVariableNames:'' |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
21 |
poolDictionaries:'' |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
22 |
category:'Interface-Graphics' |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
23 |
! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
24 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
25 |
!X11GraphicsContext primitiveDefinitions! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
26 |
%{ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
27 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
28 |
#define SUPPORT_MOTIF_WM_HINTS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
29 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
30 |
#ifdef LINUX |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
31 |
# ifndef __arm__ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
32 |
# define SHM |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
33 |
# endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
34 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
35 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
36 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
37 |
* x does a typedef Time - I need Object Time ... |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
38 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
39 |
#undef Time |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
40 |
#define Time XTime |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
41 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
42 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
43 |
* x does a #define True / False |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
44 |
* we are lucky - the ST/X True/False are not needed |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
45 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
46 |
#undef True |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
47 |
#undef False |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
48 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
49 |
#include <stdio.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
50 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
51 |
#if defined(__osx__) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
52 |
# include <malloc/malloc.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
53 |
extern void *malloc(); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
54 |
#else |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
55 |
# ifndef FREEBSD |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
56 |
# include <malloc.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
57 |
# endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
58 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
59 |
#include <X11/Xlib.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
60 |
#include <X11/Xutil.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
61 |
#include <X11/Xatom.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
62 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
63 |
#define XK_MISCELLANY |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
64 |
#include <X11/keysymdef.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
65 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
66 |
#include <X11/cursorfont.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
67 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
68 |
#ifdef LINUX |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
69 |
# include <sys/socket.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
70 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
71 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
72 |
extern OBJ __GLOBAL_GET_BY_NAME(char *); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
73 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
74 |
# define __HANDLE_VAL(type, externalAddress) \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
75 |
((type)__externalAddressVal(externalAddress)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
76 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
77 |
# define __HANDLE_NEW(ptr, __cls) \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
78 |
({ \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
79 |
OBJ handle = __MKEXTERNALADDRESS(ptr); \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
80 |
OBJ clsObj = __GLOBAL_GET_BY_NAME(__cls);\ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
81 |
__InstPtr(handle)->o_class = clsObj; \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
82 |
__STORE(handle, clsObj); \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
83 |
handle; \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
84 |
}) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
85 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
86 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
87 |
* this define suppresses XAllocColor/XFreeColor on |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
88 |
* TrueColor systems - I am not certain, if this is |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
89 |
* always legal to do (it works with XFree servers). |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
90 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
91 |
#define QUICK_TRUE_COLORS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
92 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
93 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
94 |
* shape support works; enabled by -DSHAPE in makefile |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
95 |
* see RoundClock and RoundGlobe examples |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
96 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
97 |
#ifdef SHAPE |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
98 |
# include <X11/extensions/shape.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
99 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
100 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
101 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
102 |
* shared memory extension access is currently not supported |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
103 |
* (only query is implemented) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
104 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
105 |
#ifdef SHM |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
106 |
# include <X11/extensions/XShm.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
107 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
108 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
109 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
110 |
* multiBuffer extension access is currently not supported |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
111 |
* (only query is implemented) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
112 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
113 |
#ifdef MBUF |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
114 |
# include <X11/extensions/multibuf.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
115 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
116 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
117 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
118 |
* XVideo extension access is currently not supported |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
119 |
* (only query is implemented) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
120 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
121 |
#ifdef XVIDEO |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
122 |
# include <X11/extensions/Xv.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
123 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
124 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
125 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
126 |
* PEX extension - if available |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
127 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
128 |
#ifdef PEX5 |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
129 |
# include <PEX5/PEX.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
130 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
131 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
132 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
133 |
* XImage extension - if available |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
134 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
135 |
#ifdef XIE |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
136 |
# include <X11/extensions/XIE.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
137 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
138 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
139 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
140 |
* multiscreen extension - if available |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
141 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
142 |
#ifdef XINERAMA |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
143 |
# include <X11/extensions/Xinerama.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
144 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
145 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
146 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
147 |
* XCURSOR extension - if available |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
148 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
149 |
#ifdef XCURSOR |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
150 |
# include <X11/Xcursor/Xcursor.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
151 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
152 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
153 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
154 |
* xft library (based on RENDER extension) - if available |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
155 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
156 |
#ifdef XFT |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
157 |
# include <X11/Xft/Xft.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
158 |
# include <X11/extensions/Xrender.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
159 |
# include <X11/extensions/render.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
160 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
161 |
# define XFT_FONT(x) __HANDLE_VAL(XftFont*, x) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
162 |
# define XFT_FONT_HANDLE_NEW(x) __HANDLE_NEW(x, "XftFontDescription::XftFontHandle") |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
163 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
164 |
# define XFT_DRAW(x) __HANDLE_VAL(XftDraw*, x) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
165 |
# define XFT_DRAW_HANDLE_NEW(x) __HANDLE_NEW(x, "XftFontDescription::XftDrawHandle") |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
166 |
#endif // XFT |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
167 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
168 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
169 |
* when I have more time to check it out, I will support display-PS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
170 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
171 |
#ifdef DPS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
172 |
# ifdef sgi |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
173 |
# include <X11/extensions/XDPS.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
174 |
# include <X11/extensions/XDPSlib.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
175 |
# include <X11/extensions/dpsXclient.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
176 |
# else |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
177 |
# include <DPS/XDPS.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
178 |
# include <DPS/XDPSlib.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
179 |
# include <DPS/dpsXclient.h> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
180 |
# endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
181 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
182 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
183 |
#if defined(someMachine) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
184 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
185 |
* if nformats cannot be found in the Display structure ... |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
186 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
187 |
# define NO_PRIVATE_DISPLAY_ACCESS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
188 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
189 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
190 |
#if defined(IRIX5) || defined(__VMS) || (XlibSpecificationRelease == 6) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
191 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
192 |
* accessing private data in Display ... sorry |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
193 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
194 |
# define DISPLAYACCESS(d) ((_XPrivDisplay)d) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
195 |
#else |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
196 |
# define DISPLAYACCESS(d) d |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
197 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
198 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
199 |
# define DISPLAY(x) __HANDLE_VAL(Display*, x) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
200 |
# define SCREEN(x) ((int)(__intVal(x))) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
201 |
# define DRAWABLE(x) __HANDLE_VAL(Drawable, x) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
202 |
# define GC(x) __HANDLE_VAL(GC, x) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
203 |
# define VISUAL(x) __HANDLE_VAL(Visual*, x) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
204 |
# define COLORMAP(x) __HANDLE_VAL(Colormap, x) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
205 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
206 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
207 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
208 |
* some defines - tired of typing ... |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
209 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
210 |
#define __DisplayVal(o) (Display *)(__externalAddressVal(o)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
211 |
#define __DrawableVal(o) (Drawable)(__externalAddressVal(o)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
212 |
#define __WindowVal(o) (Window)(__externalAddressVal(o)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
213 |
#define __PixmapVal(o) (Pixmap)(__externalAddressVal(o)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
214 |
#define __GCVal(o) (GC)(__externalAddressVal(o)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
215 |
#define __CursorVal(o) (Cursor)(__externalAddressVal(o)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
216 |
#define __FontVal(o) (XFontStruct *)(__externalAddressVal(o)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
217 |
#define __DPSContextVal(o) (DPSContext)(__externalAddressVal(o)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
218 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
219 |
#define __MKATOMOBJ(a) __MKSMALLINT(a) /* add STORE macro if ever changed */ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
220 |
#define __AtomVal(o) __intVal(o) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
221 |
#define __isAtomID(o) __isSmallInteger(o) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
222 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
223 |
#define myDpy __DisplayVal(__INST(displayId)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
224 |
#define ISCONNECTED ((__INST(displayId) != nil) && (__INST(hasConnectionBroken) != nil)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
225 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
226 |
#ifdef __VMS__ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
227 |
# include "vms_Xnames.h" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
228 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
229 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
230 |
void __XTimeoutErrorHandler(); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
231 |
int __XErrorHandler__(); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
232 |
int __XIOErrorHandler__(); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
233 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
234 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
235 |
* these two macros should be placed around X-lib calls, |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
236 |
* which may block due to a broken connection. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
237 |
* They setup/remove a VM-timeout which raises an exception |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
238 |
* after xlibTimeout seconds. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
239 |
* This exception will shutDown the connection. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
240 |
* Q: is this a good idea for the local display ? |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
241 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
242 |
#define __ENTER_XLIB(whichTimeout) \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
243 |
{ \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
244 |
__blockingPrimitiveTimoutHandler__ = (voidFUNC)__XTimeoutErrorHandler; \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
245 |
__blockingPrimitiveTimeoutArg__ = self; \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
246 |
__blockingPrimitiveTimeout__ = whichTimeout; \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
247 |
} { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
248 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
249 |
#define LEAVE_XLIB() \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
250 |
{ \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
251 |
__blockingPrimitiveTimoutHandler__ = (voidFUNC)0; \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
252 |
__blockingPrimitiveTimeoutArg__ = nil; \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
253 |
__blockingPrimitiveTimeout__ = 0; \ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
254 |
} } |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
255 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
256 |
#define ENTER_XLIB() __ENTER_XLIB(__intVal(__INST(xlibTimeout)) * 1000) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
257 |
#define ENTER_XLIB2() __ENTER_XLIB(__intVal(__INST(xlibTimeoutForWindowCreation)) * 1000) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
258 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
259 |
#ifdef SUPPORT_MOTIF_WM_HINTS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
260 |
# ifdef SOME_MACHINE |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
261 |
# include <anIncludeFileWhichDefinesTheStuffBelow> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
262 |
# endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
263 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
264 |
# ifndef MWM_HINTS_FUNCTIONS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
265 |
# define MWM_HINTS_FUNCTIONS (1L << 0) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
266 |
# define MWM_HINTS_DECORATIONS (1L << 1) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
267 |
# define MWM_HINTS_INPUT_MODE (1L << 2) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
268 |
# define MWM_HINTS_STATUS (1L << 3) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
269 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
270 |
# define MWM_FUNC_ALL (1L << 0) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
271 |
# define MWM_FUNC_RESIZE (1L << 1) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
272 |
# define MWM_FUNC_MOVE (1L << 2) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
273 |
# define MWM_FUNC_MINIMIZE (1L << 3) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
274 |
# define MWM_FUNC_MAXIMIZE (1L << 4) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
275 |
# define MWM_FUNC_CLOSE (1L << 5) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
276 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
277 |
# define MWM_INPUT_MODELESS 0 |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
278 |
# define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1 |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
279 |
# define MWM_INPUT_SYSTEM_MODAL 2 |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
280 |
# define MWM_INPUT_FULL_APPLICATION_MODAL 3 |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
281 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
282 |
# define MWM_DECOR_NONE 0 |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
283 |
# define MWM_DECOR_ALL (1L << 0) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
284 |
# define MWM_DECOR_BORDER (1L << 1) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
285 |
# define MWM_DECOR_RESIZEH (1L << 2) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
286 |
# define MWM_DECOR_TITLE (1L << 3) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
287 |
# define MWM_DECOR_MENU (1L << 4) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
288 |
# define MWM_DECOR_MINIMIZE (1L << 5) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
289 |
# define MWM_DECOR_MAXIMIZE (1L << 6) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
290 |
# endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
291 |
#endif /* SUPPORT_MOTIF_WM_HINTS */ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
292 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
293 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
294 |
* openlook hints are not supported yet |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
295 |
* - noone needs them anymore ;-( |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
296 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
297 |
#ifdef SUPPORT_OPENLOOCK_WM_HINTS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
298 |
# ifdef SOME_MACHINE |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
299 |
# include <anIncludeFileWhichDefinesTheStuffBelow> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
300 |
# endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
301 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
302 |
# ifndef OL_DECOR_CLOSE |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
303 |
# define OL_DECOR_CLOSE (1L << 0) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
304 |
# define OL_DECOR_RESIZEH (1L << 1) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
305 |
# define OL_DECOR_HEADER (1L << 2) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
306 |
# define OL_DECOR_ICON_NAME (1L << 3) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
307 |
# define OL_DECOR_ALL (OL_DECOR_CLOSE | OL_DECOR_RESIZEH | OL_DECOR_HEADER | OL_DECOR_ICON_NAME) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
308 |
# define OL_ANY_HINTS (1L << 7) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
309 |
# endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
310 |
#endif /* SUPPORT_OPENLOOCK_WM_HINTS */ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
311 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
312 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
313 |
%} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
314 |
! ! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
315 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
316 |
!X11GraphicsContext methodsFor:'accessing'! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
317 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
318 |
depth |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
319 |
^ depth |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
320 |
! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
321 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
322 |
xftDrawId |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
323 |
^ xftDrawId |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
324 |
! ! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
325 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
326 |
!X11GraphicsContext methodsFor:'destroying'! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
327 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
328 |
destroy |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
329 |
xftDrawId notNil ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
330 |
self destroyXftDrawId. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
331 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
332 |
super destroy. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
333 |
! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
334 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
335 |
destroyXftDrawId |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
336 |
|id| |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
337 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
338 |
id := xftDrawId. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
339 |
xftDrawId := nil. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
340 |
%{ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
341 |
#ifdef XFT |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
342 |
if (__isExternalAddress(id)) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
343 |
XftDraw *address = (XftDraw *)__externalAddressVal(id); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
344 |
if (address) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
345 |
XftDrawDestroy(address); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
346 |
__externalAddressVal(id) = 0; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
347 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
348 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
349 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
350 |
%}. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
351 |
! ! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
352 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
353 |
!X11GraphicsContext methodsFor:'displaying'! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
354 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
355 |
displayDeviceString:aString from:index1 to:index2 x:x y:y opaque:opaque |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
356 |
"draw a sub-string - if opaque is false, draw foreground only; otherwise, draw both |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
357 |
foreground and background characters. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
358 |
If the coordinates are not integers, an error is triggered." |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
359 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
360 |
<context: #return> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
361 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
362 |
|displayId| |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
363 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
364 |
font isXftFont ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
365 |
self displayDeviceXftString:aString from:index1 to:index2 x:x y:y opaque:opaque. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
366 |
^ self. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
367 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
368 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
369 |
device flushIfAppropriate. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
370 |
displayId := device displayIdOrErrorIfBroken. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
371 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
372 |
%{ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
373 |
GC gc; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
374 |
Window win; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
375 |
char *cp; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
376 |
int i1, i2, l, n; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
377 |
# define NLOCALBUFFER 200 |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
378 |
XChar2b xlatebuffer[NLOCALBUFFER]; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
379 |
int nInstBytes; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
380 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
381 |
if (__isExternalAddress(displayId) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
382 |
&& __isExternalAddress(__INST(gcId)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
383 |
&& __isExternalAddress(__INST(drawableId)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
384 |
&& __isNonNilObject(aString) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
385 |
&& __bothSmallInteger(index1, index2) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
386 |
&& __bothSmallInteger(x, y)) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
387 |
int lMax = __intVal(@global(XWorkstation:MaxStringLength)); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
388 |
Display *dpy = __DisplayVal(displayId); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
389 |
gc = __GCVal(__INST(gcId)); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
390 |
win = __WindowVal(__INST(drawableId)); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
391 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
392 |
i1 = __intVal(index1) - 1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
393 |
if (i1 >= 0) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
394 |
OBJ cls; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
395 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
396 |
i2 = __intVal(index2) - 1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
397 |
if (i2 < i1) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
398 |
RETURN (self); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
399 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
400 |
cp = (char *) __stringVal(aString); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
401 |
l = i2 - i1 + 1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
402 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
403 |
if (__isStringLike(aString)) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
404 |
n = __stringSize(aString); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
405 |
if (i2 < n) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
406 |
cp += i1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
407 |
if (l > lMax) l = lMax; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
408 |
__ENTER_XLIB(1000 * __intVal(@global(XWorkstation:DefaultXLibTimeout))); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
409 |
if (opaque == true) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
410 |
XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, l); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
411 |
else |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
412 |
XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, l); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
413 |
LEAVE_XLIB(); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
414 |
RETURN ( self ); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
415 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
416 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
417 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
418 |
cls = __qClass(aString); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
419 |
nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
420 |
cp += nInstBytes; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
421 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
422 |
if (__isBytes(aString)) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
423 |
n = __byteArraySize(aString) - nInstBytes - 1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
424 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
425 |
if (i2 < n) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
426 |
cp += i1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
427 |
if (l > lMax) l = lMax; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
428 |
__ENTER_XLIB(1000 * __intVal(@global(XWorkstation:DefaultXLibTimeout))); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
429 |
if (opaque == true) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
430 |
XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, l); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
431 |
else |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
432 |
XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, l); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
433 |
LEAVE_XLIB(); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
434 |
RETURN ( self ); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
435 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
436 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
437 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
438 |
/* TWOBYTESTRINGS */ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
439 |
if (__isWords(aString)) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
440 |
n = (__byteArraySize(aString) - nInstBytes) / 2; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
441 |
if (i2 < n) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
442 |
union { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
443 |
char b[2]; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
444 |
unsigned short s; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
445 |
} u; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
446 |
int i; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
447 |
XChar2b *cp2 = (XChar2b *)0; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
448 |
int mustFree = 0; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
449 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
450 |
cp += (i1 * 2); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
451 |
if (l > lMax) l = lMax; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
452 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
453 |
#if defined(MSBFIRST) || defined(__MSBFIRST) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
454 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
455 |
* chars already in correct order |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
456 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
457 |
#else |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
458 |
# if ! (defined(LSBFIRST) || defined(__LSBFIRST)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
459 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
460 |
* ST/X TwoByteStrings store the asciiValue in native byteOrder; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
461 |
* X expects them MSB first |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
462 |
* convert as required |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
463 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
464 |
u.s = 0x1234; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
465 |
if (u.b[0] != 0x12) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
466 |
# endif // ! (defined(LSBFIRST) || defined(__LSBFIRST)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
467 |
{ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
468 |
if (l <= NLOCALBUFFER) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
469 |
cp2 = xlatebuffer; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
470 |
} else { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
471 |
cp2 = (XChar2b *)(malloc(l * 2)); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
472 |
mustFree = 1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
473 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
474 |
for (i=0; i<l; i++) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
475 |
cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
476 |
cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
477 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
478 |
cp = (char *) cp2; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
479 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
480 |
#endif // ! (defined(MSBFIRST) || defined(__MSBFIRST)) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
481 |
__ENTER_XLIB(1000 * __intVal(@global(XWorkstation:DefaultXLibTimeout))); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
482 |
if (opaque == true) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
483 |
XDrawImageString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
484 |
else |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
485 |
XDrawString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
486 |
LEAVE_XLIB(); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
487 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
488 |
if (mustFree) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
489 |
free(cp2); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
490 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
491 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
492 |
RETURN ( self ); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
493 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
494 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
495 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
496 |
/* FOURBYTESTRINGS */ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
497 |
if (__isLongs(aString)) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
498 |
n = (__byteArraySize(aString) - nInstBytes) / 4; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
499 |
if (i2 < n) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
500 |
union { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
501 |
char b[2]; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
502 |
unsigned short s; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
503 |
} u; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
504 |
int i; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
505 |
XChar2b *cp2 = (XChar2b *)0; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
506 |
int32 *ip; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
507 |
int mustFree = 0; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
508 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
509 |
cp += (i1 * 4); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
510 |
if (l > lMax) l = lMax; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
511 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
512 |
/* |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
513 |
* all codePoints <= 16rFFFF are draw; above 16bit range are drawn as 16rFFFF. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
514 |
*/ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
515 |
if (l <= NLOCALBUFFER) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
516 |
cp2 = xlatebuffer; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
517 |
} else { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
518 |
cp2 = (XChar2b *)(malloc(l * 2)); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
519 |
mustFree = 1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
520 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
521 |
for (i=0; i<l; i++) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
522 |
int32 codePoint = ((int32 *)cp)[i]; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
523 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
524 |
if (codePoint > 0xFFFF) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
525 |
codePoint = 0xFFFF; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
526 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
527 |
cp2[i].byte1 = (codePoint >> 8) & 0xFF; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
528 |
cp2[i].byte2 = codePoint & 0xFF; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
529 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
530 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
531 |
__ENTER_XLIB(1000 * __intVal(@global(XWorkstation:DefaultXLibTimeout))); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
532 |
if (opaque == true) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
533 |
XDrawImageString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp2, l); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
534 |
else |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
535 |
XDrawString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp2, l); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
536 |
LEAVE_XLIB(); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
537 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
538 |
if (mustFree) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
539 |
free(cp2); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
540 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
541 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
542 |
RETURN ( self ); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
543 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
544 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
545 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
546 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
547 |
#undef NLOCALBUFFER |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
548 |
%}. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
549 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
550 |
"x/y not integer, badGC or drawable, or not a string" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
551 |
device primitiveFailedOrClosedConnection |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
552 |
! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
553 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
554 |
displayDeviceXftString:aString from:index1 to:index2Arg x:drawX y:drawY opaque:opaque |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
555 |
"draw a sub-string - if opaque is false, draw foreground only; otherwise, draw both |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
556 |
foreground and background characters. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
557 |
If the coordinates are not integers, an error is triggered." |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
558 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
559 |
<context: #return> |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
560 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
561 |
|index2 bytesPerCharacter |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
562 |
clipX clipY clipW clipH |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
563 |
fgR fgG fgB fgA fgPixel bgR bgG bgB bgA bgPixel |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
564 |
displayId screen error stringLen |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
565 |
newXftDrawId pixmapDepth fontId| |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
566 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
567 |
"/ device flushIfAppropriate. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
568 |
displayId := device displayIdOrErrorIfBroken. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
569 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
570 |
"limit the string len, otherwise bad output is generated" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
571 |
stringLen := index2Arg - index1 + 1. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
572 |
stringLen > 1000 "8000" ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
573 |
index2 := index1 + 1000 "8000" - 1. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
574 |
] ifFalse:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
575 |
stringLen <= 0 ifTrue:[^ self]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
576 |
index2 := index2Arg. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
577 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
578 |
bytesPerCharacter := aString bytesPerCharacter. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
579 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
580 |
clipRect notNil ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
581 |
clipX := clipRect left. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
582 |
clipY := clipRect top. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
583 |
clipW := clipRect width. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
584 |
clipH := clipRect height. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
585 |
"/clipW > 32767 ifTrue:['clipW > 32767: ' errorPrint. clipW errorPrintCR. clipW := 32767]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
586 |
"/(clipX > 16384 or:[clipX < -16384]) ifTrue:['clipX > 16384: ' errorPrint. clipX errorPrintCR.]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
587 |
"/ YES YES YES: this MUST be transformed!! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
588 |
"/ (see htmlView) fix the notebook, please. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
589 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
590 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
591 |
fgR := paint scaledRed. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
592 |
fgR notNil ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
593 |
fgG := paint scaledGreen. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
594 |
fgB := paint scaledBlue. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
595 |
fgA := paint scaledAlpha. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
596 |
] ifFalse:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
597 |
"/ when drawing into a pixmap... |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
598 |
fgPixel := paint colorId. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
599 |
fgPixel == 0 ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
600 |
fgR := fgG := fgB := 0. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
601 |
] ifFalse:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
602 |
fgR := fgG := fgB := 16rFFFF. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
603 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
604 |
fgA := 16rFFFF. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
605 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
606 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
607 |
opaque ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
608 |
bgPaint isColor ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
609 |
bgR := bgPaint scaledRed. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
610 |
bgR notNil ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
611 |
bgG := bgPaint scaledGreen. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
612 |
bgB := bgPaint scaledBlue. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
613 |
bgA := bgPaint scaledAlpha. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
614 |
] ifFalse:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
615 |
"/ when drawing into a pixmap... |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
616 |
bgPixel := bgPaint colorId. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
617 |
bgPixel == 0 ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
618 |
bgR := bgG := bgB := 0. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
619 |
] ifFalse:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
620 |
bgR := bgG := bgB := 16rFFFF. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
621 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
622 |
bgA := 16rFFFF. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
623 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
624 |
] ifFalse:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
625 |
"images as background are not yet implemented" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
626 |
"/ #todo: fill background rectangle |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
627 |
bgR := bgG := bgB := bgA := 16rFFFF. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
628 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
629 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
630 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
631 |
screen := device screen. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
632 |
self isPixmap ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
633 |
pixmapDepth := depth. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
634 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
635 |
fontId := font getXftFontId. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
636 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
637 |
%{ /* STACK: 64000 */ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
638 |
#ifdef XFT |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
639 |
XftColor color; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
640 |
XGlyphInfo extents; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
641 |
XRectangle clipRX; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
642 |
char *string; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
643 |
int len; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
644 |
int __bytesPerCharacter; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
645 |
XftDraw *__xftDrawId; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
646 |
XftFont *__xftFont; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
647 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
648 |
if (!(__bothSmallInteger(drawX, drawY) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
649 |
&& __bothSmallInteger(index1, index2) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
650 |
&& __isSmallInteger(bytesPerCharacter) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
651 |
&& (__isSmallInteger(fgPixel) || (__bothSmallInteger(fgR, fgG) && __bothSmallInteger(fgB, fgA))) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
652 |
&& (opaque == false || __isSmallInteger(bgPixel) || (__bothSmallInteger(bgR, bgG) && __bothSmallInteger(bgB, bgA))) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
653 |
&& __isNonNilObject(aString) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
654 |
&& __isExternalAddress(displayId) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
655 |
&& __isExternalAddressLike(fontId) |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
656 |
)) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
657 |
error = @symbol(badArgument); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
658 |
goto out; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
659 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
660 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
661 |
__xftFont = XFT_FONT(fontId); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
662 |
__bytesPerCharacter = __intVal(bytesPerCharacter); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
663 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
664 |
if (__INST(xftDrawId) != nil) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
665 |
__xftDrawId = __externalAddressVal(__INST(xftDrawId)); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
666 |
} else { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
667 |
if (pixmapDepth != nil) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
668 |
int __pixmapDepth = __intVal(pixmapDepth); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
669 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
670 |
if (__pixmapDepth == 1) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
671 |
__xftDrawId = XftDrawCreateBitmap(DISPLAY(displayId), DRAWABLE(__INST(drawableId))); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
672 |
} else { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
673 |
__xftDrawId = XftDrawCreateAlpha(DISPLAY(displayId), DRAWABLE(__INST(drawableId)), __pixmapDepth); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
674 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
675 |
} else { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
676 |
__xftDrawId = XftDrawCreate(DISPLAY(displayId), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
677 |
DRAWABLE(__INST(drawableId)), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
678 |
DefaultVisual(DISPLAY(displayId), SCREEN(screen)), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
679 |
DefaultColormap(DISPLAY(displayId), SCREEN(screen))); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
680 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
681 |
__INST(xftDrawId) = newXftDrawId = XFT_DRAW_HANDLE_NEW(__xftDrawId); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
682 |
__STORE(self, newXftDrawId); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
683 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
684 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
685 |
string = __stringVal(aString) + ((__intVal(index1) - 1 ) * __bytesPerCharacter); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
686 |
len = __intVal(index2) - __intVal(index1) + 1; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
687 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
688 |
if (clipX != nil) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
689 |
clipRX.x = __intVal(clipX); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
690 |
clipRX.y = __intVal(clipY); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
691 |
clipRX.width = __intVal(clipW); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
692 |
clipRX.height = __intVal(clipH); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
693 |
XftDrawSetClipRectangles(__xftDrawId, 0, 0, &clipRX, 1); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
694 |
} else { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
695 |
XftDrawSetClip(__xftDrawId, 0); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
696 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
697 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
698 |
if (opaque == true) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
699 |
if (bgPixel != nil) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
700 |
color.pixel = (unsigned long)__intVal(bgPixel); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
701 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
702 |
color.color.red = __intVal(bgR); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
703 |
color.color.green = __intVal(bgG); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
704 |
color.color.blue = __intVal(bgB); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
705 |
color.color.alpha = __intVal(bgA); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
706 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
707 |
switch (__bytesPerCharacter) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
708 |
case 1: |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
709 |
XftTextExtents8(DISPLAY(displayId), __xftFont, (FcChar8*)string, len, &extents); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
710 |
break; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
711 |
case 2: |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
712 |
XftTextExtents16(DISPLAY(displayId), __xftFont, (FcChar16*)string, len, &extents); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
713 |
break; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
714 |
case 4: |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
715 |
XftTextExtents32(DISPLAY(displayId), __xftFont, (FcChar32*)string, len, &extents); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
716 |
break; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
717 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
718 |
if (extents.width < 0) printf("width: %d < 0\n", extents.width); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
719 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
720 |
XftDrawRect(__xftDrawId, &color, __intVal(drawX) - extents.x, __intVal(drawY) - __xftFont->ascent, extents.width, __xftFont->height); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
721 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
722 |
if (__isSmallInteger(fgPixel)) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
723 |
color.pixel = (unsigned long)__intVal(fgPixel); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
724 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
725 |
color.color.red = __intVal(fgR); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
726 |
color.color.green = __intVal(fgG); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
727 |
color.color.blue = __intVal(fgB); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
728 |
color.color.alpha = __intVal(fgA); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
729 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
730 |
switch (__bytesPerCharacter) { |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
731 |
case 1: |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
732 |
XftDrawString8(__xftDrawId, &color,__xftFont, |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
733 |
__intVal(drawX), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
734 |
__intVal(drawY), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
735 |
(FcChar8*)string, |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
736 |
len); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
737 |
break; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
738 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
739 |
case 2: |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
740 |
XftDrawString16(__xftDrawId, &color, __xftFont, |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
741 |
__intVal(drawX), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
742 |
__intVal(drawY), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
743 |
(FcChar16*)string, |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
744 |
len); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
745 |
break; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
746 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
747 |
case 4: |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
748 |
XftDrawString32(__xftDrawId, &color, __xftFont, |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
749 |
__intVal(drawX), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
750 |
__intVal(drawY), |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
751 |
(FcChar32*)string, |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
752 |
len); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
753 |
break; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
754 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
755 |
default: |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
756 |
error = @symbol(invalidStringSize); |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
757 |
goto out; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
758 |
} |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
759 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
760 |
out:; |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
761 |
#endif |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
762 |
%}. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
763 |
error notNil ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
764 |
self primitiveFailed: error. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
765 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
766 |
! ! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
767 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
768 |
!X11GraphicsContext methodsFor:'drawing'! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
769 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
770 |
XXclearDeviceRectangleX:x y:y width:width height:height |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
771 |
device clearRectangleX:x y:y width:width height:height in:drawableId with:gcId |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
772 |
! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
773 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
774 |
XXclearRectangleX:x y:y width:w height:h |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
775 |
"draw a filled rectangle; apply transformation if nonNil" |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
776 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
777 |
|pX pY nW nH pO pC| |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
778 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
779 |
gcId isNil ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
780 |
self initGC |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
781 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
782 |
transformation notNil ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
783 |
pO := transformation transformPoint:x@y. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
784 |
pC := transformation transformPoint:(x+w-1)@(y+h-1). |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
785 |
pX := pO x. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
786 |
pY := pO y. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
787 |
nW := pC x - pX + 1. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
788 |
nH := pC y - pY + 1. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
789 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
790 |
nW < 0 ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
791 |
nW := nW abs. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
792 |
pX := pX - nW. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
793 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
794 |
nH < 0 ifTrue:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
795 |
nH := nH abs. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
796 |
pY := pY - nH. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
797 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
798 |
] ifFalse:[ |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
799 |
pX := x. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
800 |
pY := y. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
801 |
nW := w. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
802 |
nH := h. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
803 |
]. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
804 |
pX := pX rounded. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
805 |
pY := pY rounded. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
806 |
nW := nW rounded. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
807 |
nH := nH rounded. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
808 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
809 |
device |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
810 |
clearRectangleX:pX |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
811 |
y:pY |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
812 |
width:nW |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
813 |
height:nH |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
814 |
in:drawableId with:gcId |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
815 |
! ! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
816 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
817 |
!X11GraphicsContext methodsFor:'view creation'! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
818 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
819 |
createBitmapFromArray:data width:width height:height |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
820 |
depth := 1. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
821 |
super createBitmapFromArray:data width:width height:height |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
822 |
! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
823 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
824 |
createPixmapWidth:w height:h depth:d |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
825 |
depth := d. |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
826 |
super createPixmapWidth:w height:h depth:d |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
827 |
! ! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
828 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
829 |
!X11GraphicsContext class methodsFor:'documentation'! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
830 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
831 |
version |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
832 |
^ '$Header$' |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
833 |
! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
834 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
835 |
version_CVS |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
836 |
^ '$Header$' |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
837 |
! ! |
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
838 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
839 |
|
f1060ceb2b3c
made X11GraphicsContext a public class
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
840 |
X11GraphicsContext initialize! |