Incorporate x11, lazy-loaded.
This commit is contained in:
@ -196,6 +196,8 @@ COMMON_DESKTOP = common/ansi.fs common/desktop.fs \
|
|||||||
POSIX_BOOT = $(COMMON_PHASE1) \
|
POSIX_BOOT = $(COMMON_PHASE1) \
|
||||||
posix/posix.fs posix/allocation.fs posix/termios.fs \
|
posix/posix.fs posix/allocation.fs posix/termios.fs \
|
||||||
$(COMMON_PHASE2) $(COMMON_DESKTOP) \
|
$(COMMON_PHASE2) $(COMMON_DESKTOP) \
|
||||||
|
posix/x11.fs \
|
||||||
|
posix/grf.fs \
|
||||||
posix/sockets.fs posix/telnetd.fs posix/httpd.fs posix/web_interface.fs \
|
posix/sockets.fs posix/telnetd.fs posix/httpd.fs posix/web_interface.fs \
|
||||||
posix/autoboot.fs \
|
posix/autoboot.fs \
|
||||||
common/fini.fs
|
common/fini.fs
|
||||||
|
|||||||
@ -529,6 +529,7 @@ e: test-posix-forth-namespace
|
|||||||
out: httpd
|
out: httpd
|
||||||
out: telnetd
|
out: telnetd
|
||||||
out: sockets
|
out: sockets
|
||||||
|
out: x11
|
||||||
check-desktop
|
check-desktop
|
||||||
check-phase2
|
check-phase2
|
||||||
out: form
|
out: form
|
||||||
|
|||||||
@ -60,9 +60,10 @@ variable confirm-old-type
|
|||||||
>r >r >r 1+ r> 1- r> 1+ r> 1-
|
>r >r >r 1+ r> 1- r> 1+ r> 1-
|
||||||
again
|
again
|
||||||
;
|
;
|
||||||
|
: stars ( n -- ) 1- for 42 emit next ;
|
||||||
: expect-finish expected resulted str= if exit then }confirm
|
: expect-finish expected resulted str= if exit then }confirm
|
||||||
cr ." Expected:" cr expected resulted diverged type cr
|
cr ." Expected:" cr expected resulted diverged type 30 stars cr
|
||||||
." Resulted:" cr resulted expected diverged type cr 1 throw ;
|
." Resulted:" cr resulted expected diverged type 30 stars cr 1 throw ;
|
||||||
|
|
||||||
( Better error asserts )
|
( Better error asserts )
|
||||||
: =assert ( actual expected -- )
|
: =assert ( actual expected -- )
|
||||||
|
|||||||
31
ueforth/posix/grf.fs
Normal file
31
ueforth/posix/grf.fs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
\ Copyright 2022 Bradley D. Nelson
|
||||||
|
\
|
||||||
|
\ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
\ you may not use this file except in compliance with the License.
|
||||||
|
\ You may obtain a copy of the License at
|
||||||
|
\
|
||||||
|
\ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
\
|
||||||
|
\ Unless required by applicable law or agreed to in writing, software
|
||||||
|
\ distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
\ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
\ See the License for the specific language governing permissions and
|
||||||
|
\ limitations under the License.
|
||||||
|
|
||||||
|
( Lazy load expand Graphics for Xlib )
|
||||||
|
|
||||||
|
grf definitions
|
||||||
|
|
||||||
|
: window r|
|
||||||
|
|
||||||
|
forth grf internals definitions also x11
|
||||||
|
|
||||||
|
|
||||||
|
grf definitions also internals also x11
|
||||||
|
|
||||||
|
|
||||||
|
only forth definitions
|
||||||
|
window
|
||||||
|
| evaluate ;
|
||||||
|
|
||||||
|
forth definitions
|
||||||
@ -12,8 +12,11 @@
|
|||||||
\ See the License for the specific language governing permissions and
|
\ See the License for the specific language governing permissions and
|
||||||
\ limitations under the License.
|
\ limitations under the License.
|
||||||
|
|
||||||
( Bindings for Xlib )
|
( Lazy load bindings for Xlib )
|
||||||
also posix
|
|
||||||
|
: x11 r|
|
||||||
|
|
||||||
|
forth also posix
|
||||||
vocabulary x11 also x11 definitions
|
vocabulary x11 also x11 definitions
|
||||||
|
|
||||||
z" libX11.so" shared-library xlib
|
z" libX11.so" shared-library xlib
|
||||||
@ -114,3 +117,5 @@ xevent GenericEvent
|
|||||||
drop
|
drop
|
||||||
|
|
||||||
only forth definitions
|
only forth definitions
|
||||||
|
x11
|
||||||
|
| evaluate ;
|
||||||
@ -13,8 +13,6 @@
|
|||||||
\ See the License for the specific language governing permissions and
|
\ See the License for the specific language governing permissions and
|
||||||
\ limitations under the License.
|
\ limitations under the License.
|
||||||
|
|
||||||
include posix/xlib.fs
|
|
||||||
|
|
||||||
also x11
|
also x11
|
||||||
|
|
||||||
0 XOpenDisplay constant display
|
0 XOpenDisplay constant display
|
||||||
|
|||||||
Reference in New Issue
Block a user