mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 20:49:49 +02:00
* new x11 package
This commit is contained in:
parent
1a67c14f66
commit
823c58dfc9
966
packages/x11/Makefile
Normal file
966
packages/x11/Makefile
Normal file
@ -0,0 +1,966 @@
|
||||
#
|
||||
# Makefile generated by fpcmake v0.99.13 on 1999-12-23 20:20
|
||||
#
|
||||
|
||||
defaultrule: all
|
||||
|
||||
#####################################################################
|
||||
# Autodetect OS (Linux or Dos or Windows NT)
|
||||
# define inlinux when running under linux
|
||||
# define inWinNT when running under WinNT
|
||||
#####################################################################
|
||||
|
||||
# We need only / in the path
|
||||
override PATH:=$(subst \,/,$(PATH))
|
||||
|
||||
# Search for PWD and determine also if we are under linux
|
||||
PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
|
||||
ifeq ($(PWD),)
|
||||
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
|
||||
ifeq ($(PWD),)
|
||||
nopwd:
|
||||
@echo You need the GNU utils package to use this Makefile!
|
||||
@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
|
||||
@exit
|
||||
else
|
||||
inlinux=1
|
||||
endif
|
||||
else
|
||||
PWD:=$(firstword $(PWD))
|
||||
endif
|
||||
|
||||
# Detect NT - NT sets OS to Windows_NT
|
||||
ifndef inlinux
|
||||
ifeq ($(OS),Windows_NT)
|
||||
inWinNT=1
|
||||
endif
|
||||
endif
|
||||
|
||||
# Detect OS/2 - OS/2 has OS2_SHELL defined
|
||||
ifndef inlinux
|
||||
ifndef inWinNT
|
||||
ifdef OS2_SHELL
|
||||
inOS2=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# The extension of executables
|
||||
ifdef inlinux
|
||||
EXEEXT=
|
||||
else
|
||||
EXEEXT=.exe
|
||||
endif
|
||||
|
||||
# The path which is search separated by spaces
|
||||
ifdef inlinux
|
||||
SEARCHPATH=$(subst :, ,$(PATH))
|
||||
else
|
||||
SEARCHPATH=$(subst ;, ,$(PATH))
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# FPC version/target Detection
|
||||
#####################################################################
|
||||
|
||||
# What compiler to use ?
|
||||
ifndef FPC
|
||||
# Compatibility with old makefiles
|
||||
ifdef PP
|
||||
export FPC=$(PP)
|
||||
else
|
||||
ifdef inOS2
|
||||
export FPC=ppos2$(EXEEXT)
|
||||
else
|
||||
export FPC=ppc386$(EXEEXT)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Target OS
|
||||
ifndef OS_TARGET
|
||||
export OS_TARGET:=$(shell $(FPC) -iTO)
|
||||
endif
|
||||
|
||||
# Source OS
|
||||
ifndef OS_SOURCE
|
||||
export OS_SOURCE:=$(shell $(FPC) -iSO)
|
||||
endif
|
||||
|
||||
# Target CPU
|
||||
ifndef CPU_TARGET
|
||||
export CPU_TARGET:=$(shell $(FPC) -iTP)
|
||||
endif
|
||||
|
||||
# Source CPU
|
||||
ifndef CPU_SOURCE
|
||||
export CPU_SOURCE:=$(shell $(FPC) -iSP)
|
||||
endif
|
||||
|
||||
# FPC version
|
||||
ifndef FPC_VERSION
|
||||
export FPC_VERSION:=$(shell $(FPC) -iV)
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Default Settings
|
||||
#####################################################################
|
||||
|
||||
# Release ? Then force OPT and don't use extra opts via commandline
|
||||
ifndef REDIRFILE
|
||||
REDIRFILE=log
|
||||
endif
|
||||
|
||||
ifdef RELEASE
|
||||
override OPT:=-Xs -OG2p3 -n
|
||||
endif
|
||||
|
||||
# Verbose settings (warning,note,info)
|
||||
ifdef VERBOSE
|
||||
override OPT+=-vwni
|
||||
endif
|
||||
|
||||
ifdef REDIR
|
||||
ifndef inlinux
|
||||
override FPC=redir -eo $(FPC)
|
||||
endif
|
||||
# set the verbosity to max
|
||||
override OPT+=-va
|
||||
override REDIR:= >> $(REDIRFILE)
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# User Settings
|
||||
#####################################################################
|
||||
|
||||
|
||||
# Targets
|
||||
|
||||
override UNITOBJECTS+=x xresource xlib xutil
|
||||
|
||||
# Clean
|
||||
|
||||
|
||||
# Install
|
||||
|
||||
ZIPTARGET=install
|
||||
|
||||
# Defaults
|
||||
|
||||
|
||||
# Directories
|
||||
|
||||
ifndef FPCDIR
|
||||
FPCDIR=../..
|
||||
endif
|
||||
ifndef PACKAGEDIR
|
||||
PACKAGEDIR=$(FPCDIR)/packages
|
||||
endif
|
||||
ifndef COMPONENTDIR
|
||||
COMPONENTDIR=$(FPCDIR)/components
|
||||
endif
|
||||
|
||||
# Packages
|
||||
|
||||
|
||||
# Libraries
|
||||
|
||||
|
||||
# Info
|
||||
|
||||
INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
|
||||
|
||||
#####################################################################
|
||||
# Default Directories
|
||||
#####################################################################
|
||||
|
||||
# Base dir
|
||||
ifdef PWD
|
||||
BASEDIR:=$(shell $(PWD))
|
||||
else
|
||||
BASEDIR=.
|
||||
endif
|
||||
|
||||
# this can be set to 'rtl' when the RTL units are installed
|
||||
ifndef UNITPREFIX
|
||||
UNITPREFIX=units
|
||||
endif
|
||||
|
||||
# set the prefix directory where to install everything
|
||||
ifndef PREFIXINSTALLDIR
|
||||
ifdef inlinux
|
||||
export PREFIXINSTALLDIR=/usr
|
||||
else
|
||||
export PREFIXINSTALLDIR=/pp
|
||||
endif
|
||||
endif
|
||||
|
||||
# create fcldir,rtldir,unitdir
|
||||
ifdef FPCDIR
|
||||
override FPCDIR:=$(subst \,/,$(FPCDIR))
|
||||
ifneq ($(FPCDIR),.)
|
||||
override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
|
||||
override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
|
||||
override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
|
||||
endif
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Install Directories
|
||||
#####################################################################
|
||||
|
||||
# set the base directory where to install everything
|
||||
ifndef BASEINSTALLDIR
|
||||
ifdef inlinux
|
||||
BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
|
||||
else
|
||||
BASEINSTALLDIR=$(PREFIXINSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# set the directory where to install the binaries
|
||||
ifndef BININSTALLDIR
|
||||
ifdef inlinux
|
||||
BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
|
||||
else
|
||||
BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
|
||||
endif
|
||||
endif
|
||||
|
||||
# set the directory where to install the units.
|
||||
ifndef UNITINSTALLDIR
|
||||
UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
|
||||
endif
|
||||
|
||||
# Where to install shared libraries
|
||||
ifndef LIBINSTALLDIR
|
||||
ifdef inlinux
|
||||
LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
|
||||
else
|
||||
LIBINSTALLDIR=$(UNITINSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Where the source files will be stored
|
||||
ifndef SOURCEINSTALLDIR
|
||||
ifdef inlinux
|
||||
SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
|
||||
else
|
||||
SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
|
||||
endif
|
||||
endif
|
||||
|
||||
# Where the doc files will be stored
|
||||
ifndef DOCINSTALLDIR
|
||||
ifdef inlinux
|
||||
DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
|
||||
else
|
||||
DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
|
||||
endif
|
||||
endif
|
||||
|
||||
# Where the some extra (data)files will be stored
|
||||
ifndef EXTRAINSTALLDIR
|
||||
EXTRAINSTALLDIR=$(BASEINSTALLDIR)
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Compiler Command Line
|
||||
#####################################################################
|
||||
|
||||
# Load commandline OPTDEF and add FPC_CPU define
|
||||
override FPCOPTDEF:=-d$(CPU_TARGET)
|
||||
|
||||
# Load commandline OPT and add target and unit dir to be sure
|
||||
ifneq ($(OS_TARGET),$(OS_SOURCE))
|
||||
override FPCOPT+=-T$(OS_TARGET)
|
||||
endif
|
||||
|
||||
ifdef RTLDIR
|
||||
override FPCOPT+=-Fu$(RTLDIR)
|
||||
endif
|
||||
|
||||
ifdef UNITSDIR
|
||||
override FPCOPT+=-Fu$(UNITSDIR)
|
||||
endif
|
||||
|
||||
# Smartlinking
|
||||
ifdef SMARTLINK
|
||||
override FPCOPT+=-CX
|
||||
endif
|
||||
|
||||
# Debug
|
||||
ifdef DEBUG
|
||||
override FPCOPT+=-g
|
||||
endif
|
||||
|
||||
# Add commandline options
|
||||
ifdef OPT
|
||||
override FPCOPT+=$(OPT)
|
||||
endif
|
||||
ifdef UNITDIR
|
||||
override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
|
||||
endif
|
||||
ifdef LIBDIR
|
||||
override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
|
||||
endif
|
||||
ifdef OBJDIR
|
||||
override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
|
||||
endif
|
||||
ifdef INCDIR
|
||||
override FPCOPT+=$(addprefix -Fi,$(INCDIR))
|
||||
endif
|
||||
|
||||
# Add defines from FPCOPTDEF to FPCOPT
|
||||
ifdef FPCOPTDEF
|
||||
override FPCOPT+=$(FPCOPTDEF)
|
||||
endif
|
||||
|
||||
# Error file ?
|
||||
ifdef ERRORFILE
|
||||
override FPCOPT+=-Fr$(ERRORFILE)
|
||||
endif
|
||||
|
||||
# Was a config file specified ?
|
||||
ifdef CFGFILE
|
||||
override FPCOPT+=@$(CFGFILE)
|
||||
endif
|
||||
|
||||
# For win32 the options are passed using the environment variable FPCEXTCMD
|
||||
ifeq ($(OS_SOURCE),win32)
|
||||
override FPCEXTCMD:=$(FPCOPT)
|
||||
override FPCOPT:=!FPCEXTCMD
|
||||
export FPCEXTCMD
|
||||
endif
|
||||
|
||||
# Compiler commandline
|
||||
override COMPILER:=$(FPC) $(FPCOPT)
|
||||
|
||||
#####################################################################
|
||||
# Shell tools
|
||||
#####################################################################
|
||||
|
||||
# To copy pograms
|
||||
ifndef COPY
|
||||
export COPY:=cp -fp
|
||||
endif
|
||||
|
||||
# Copy a whole tree
|
||||
ifndef COPYTREE
|
||||
export COPYTREE:=cp -rfp
|
||||
endif
|
||||
|
||||
# To move pograms
|
||||
ifndef MOVE
|
||||
export MOVE:=mv -f
|
||||
endif
|
||||
|
||||
# Check delete program
|
||||
ifndef DEL
|
||||
export DEL:=rm -f
|
||||
endif
|
||||
|
||||
# Check deltree program
|
||||
ifndef DELTREE
|
||||
export DELTREE:=rm -rf
|
||||
endif
|
||||
|
||||
# To install files
|
||||
ifndef INSTALL
|
||||
ifdef inlinux
|
||||
export INSTALL:=install -m 644
|
||||
else
|
||||
export INSTALL:=$(COPY)
|
||||
endif
|
||||
endif
|
||||
|
||||
# To install programs
|
||||
ifndef INSTALLEXE
|
||||
ifdef inlinux
|
||||
export INSTALLEXE:=install -m 755
|
||||
else
|
||||
export INSTALLEXE:=$(COPY)
|
||||
endif
|
||||
endif
|
||||
|
||||
# To make a directory.
|
||||
ifndef MKDIR
|
||||
ifdef inlinux
|
||||
export MKDIR:=install -m 755 -d
|
||||
else
|
||||
export MKDIR:=ginstall -m 755 -d
|
||||
endif
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Default Tools
|
||||
#####################################################################
|
||||
|
||||
# assembler, redefine it if cross compiling
|
||||
ifndef AS
|
||||
AS=as
|
||||
endif
|
||||
|
||||
# linker, but probably not used
|
||||
ifndef LD
|
||||
LD=ld
|
||||
endif
|
||||
|
||||
# ppas.bat / ppas.sh
|
||||
ifdef inlinux
|
||||
PPAS=ppas.sh
|
||||
else
|
||||
ifdef inOS2
|
||||
PPAS=ppas.cmd
|
||||
else
|
||||
PPAS=ppas.bat
|
||||
endif
|
||||
endif
|
||||
|
||||
# also call ppas if with command option -s
|
||||
ifeq (,$(findstring -s ,$(COMPILER)))
|
||||
EXECPPAS=
|
||||
else
|
||||
EXECPPAS:=@$(PPAS)
|
||||
endif
|
||||
|
||||
# ldconfig to rebuild .so cache
|
||||
ifdef inlinux
|
||||
LDCONFIG=ldconfig
|
||||
else
|
||||
LDCONFIG=
|
||||
endif
|
||||
|
||||
# echo
|
||||
ifndef ECHO
|
||||
ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
export ECHO:=echo
|
||||
else
|
||||
export ECHO:=$(firstword $(ECHO))
|
||||
endif
|
||||
endif
|
||||
|
||||
# ppdep
|
||||
ifndef PPDEP
|
||||
PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(PPDEP),)
|
||||
PPDEP=
|
||||
else
|
||||
export PPDEP:=$(firstword $(PPDEP))
|
||||
endif
|
||||
endif
|
||||
|
||||
# ppumove
|
||||
ifndef PPUMOVE
|
||||
PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(PPUMOVE),)
|
||||
PPUMOVE=
|
||||
else
|
||||
export PPUMOVE:=$(firstword $(PPUMOVE))
|
||||
endif
|
||||
endif
|
||||
|
||||
# ppufiles
|
||||
ifndef PPUFILES
|
||||
PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(PPUFILES),)
|
||||
PPUFILES=
|
||||
else
|
||||
export PPUFILES:=$(firstword $(PPUFILES))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
|
||||
# upx uses that one itself (PFV)
|
||||
ifndef UPXPROG
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
UPXPROG:=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
UPXPROG:=1
|
||||
endif
|
||||
ifdef UPXPROG
|
||||
UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(UPXPROG),)
|
||||
UPXPROG=
|
||||
else
|
||||
export UPXPROG:=$(firstword $(UPXPROG))
|
||||
endif
|
||||
else
|
||||
UPXPROG=
|
||||
endif
|
||||
endif
|
||||
|
||||
# gdate/date
|
||||
ifndef DATE
|
||||
DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(DATE),)
|
||||
DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
|
||||
ifeq ($(DATE),)
|
||||
DATE=
|
||||
else
|
||||
export DATE:=$(firstword $(DATE))
|
||||
endif
|
||||
else
|
||||
export DATE:=$(firstword $(DATE))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef DATE
|
||||
DATESTR:=$(shell $(DATE) +%Y%m%d)
|
||||
else
|
||||
DATESTR=
|
||||
endif
|
||||
|
||||
# ZipProg, you can't use Zip as the var name (PFV)
|
||||
ifndef ZIPPROG
|
||||
ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ZIPPROG),)
|
||||
ZIPPROG=
|
||||
else
|
||||
export ZIPPROG:=$(firstword $(ZIPPROG)) -D9 -r
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef ZIPEXT
|
||||
ZIPEXT=.zip
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Default extensions
|
||||
#####################################################################
|
||||
|
||||
# Default needed extensions (Go32v2,Linux)
|
||||
LOADEREXT=.as
|
||||
PPLEXT=.ppl
|
||||
PPUEXT=.ppu
|
||||
OEXT=.o
|
||||
ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.so
|
||||
PACKAGESUFFIX=
|
||||
FPCMADE=fpcmade
|
||||
|
||||
# Go32v1
|
||||
ifeq ($(OS_TARGET),go32v1)
|
||||
PPUEXT=.pp1
|
||||
OEXT=.o1
|
||||
ASMEXT=.s1
|
||||
SMARTEXT=.sl1
|
||||
STATICLIBEXT=.a1
|
||||
SHAREDLIBEXT=.so1
|
||||
PACKAGESUFFIX=v1
|
||||
FPCMADE=fpcmade.v1
|
||||
endif
|
||||
|
||||
# Go32v2
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
PACKAGESUFFIX=go32
|
||||
FPCMADE=fpcmade.dos
|
||||
endif
|
||||
|
||||
# Linux
|
||||
ifeq ($(OS_TARGET),linux)
|
||||
PACKAGESUFFIX=linux
|
||||
FPCMADE=fpcmade.lnx
|
||||
endif
|
||||
|
||||
# Win32
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
PPUEXT=.ppw
|
||||
OEXT=.ow
|
||||
ASMEXT=.sw
|
||||
SMARTEXT=.slw
|
||||
STATICLIBEXT=.aw
|
||||
SHAREDLIBEXT=.dll
|
||||
PACKAGESUFFIX=win32
|
||||
FPCMADE=fpcmade.w32
|
||||
endif
|
||||
|
||||
# OS/2
|
||||
ifeq ($(OS_TARGET),os2)
|
||||
PPUEXT=.ppo
|
||||
ASMEXT=.so2
|
||||
OEXT=.oo2
|
||||
SMARTEXT=.so
|
||||
STATICLIBEXT=.ao2
|
||||
SHAREDLIBEXT=.dll
|
||||
PACKAGESUFFIX=os2
|
||||
FPCMADE=fpcmade.os2
|
||||
endif
|
||||
|
||||
# library prefix
|
||||
LIBPREFIX=lib
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
LIBPREFIX=
|
||||
endif
|
||||
ifeq ($(OS_TARGET),go32v1)
|
||||
LIBPREFIX=
|
||||
endif
|
||||
|
||||
# determine which .pas extension is used
|
||||
ifndef PASEXT
|
||||
ifdef EXEOBJECTS
|
||||
override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
|
||||
else
|
||||
override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
|
||||
endif
|
||||
ifeq ($(TESTPAS),)
|
||||
PASEXT=.pp
|
||||
else
|
||||
PASEXT=.pas
|
||||
endif
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Standard rules
|
||||
#####################################################################
|
||||
|
||||
all: fpc_all
|
||||
|
||||
debug: fpc_debug
|
||||
|
||||
smart: fpc_smart
|
||||
|
||||
shared: fpc_shared
|
||||
|
||||
showinstall: fpc_showinstall
|
||||
|
||||
install: fpc_install
|
||||
|
||||
sourceinstall: fpc_sourceinstall
|
||||
|
||||
zipinstall: fpc_zipinstall
|
||||
|
||||
zipinstalladd: fpc_zipinstalladd
|
||||
|
||||
clean: fpc_clean
|
||||
|
||||
cleanall: fpc_cleanall
|
||||
|
||||
info: fpc_info
|
||||
|
||||
.PHONY: all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
|
||||
|
||||
#####################################################################
|
||||
# Package depends
|
||||
#####################################################################
|
||||
|
||||
ifneq ($(wildcard $(RTLDIR)),)
|
||||
ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
|
||||
override COMPILEPACKAGES+=rtl
|
||||
rtl_package:
|
||||
$(MAKE) -C $(RTLDIR) all
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: rtl_package
|
||||
|
||||
#####################################################################
|
||||
# Units
|
||||
#####################################################################
|
||||
|
||||
.PHONY: fpc_units
|
||||
|
||||
override ALLTARGET+=fpc_units
|
||||
|
||||
override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
|
||||
override INSTALLPPUFILES+=$(UNITPPUFILES)
|
||||
override CLEANPPUFILES+=$(UNITPPUFILES)
|
||||
|
||||
fpc_units: $(UNITPPUFILES)
|
||||
|
||||
#####################################################################
|
||||
# General compile rules
|
||||
#####################################################################
|
||||
|
||||
.PHONY: fpc_all fpc_debug
|
||||
|
||||
$(FPCMADE):
|
||||
@$(ECHO) Compiled > $(FPCMADE)
|
||||
|
||||
fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
|
||||
$(addsuffix _component,$(COMPILECOMPONENTS)) \
|
||||
$(ALLTARGET) $(FPCMADE)
|
||||
|
||||
fpc_debug:
|
||||
$(MAKE) all DEBUG=1
|
||||
|
||||
# General compile rules, available for both possible PASEXT
|
||||
|
||||
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
|
||||
|
||||
%$(PPUEXT): %.pp
|
||||
$(COMPILER) $< $(REDIR)
|
||||
$(EXECPASS)
|
||||
|
||||
%$(PPUEXT): %.pas
|
||||
$(COMPILER) $< $(REDIR)
|
||||
$(EXECPASS)
|
||||
|
||||
%$(EXEEXT): %.pp
|
||||
$(COMPILER) $< $(REDIR)
|
||||
$(EXECPASS)
|
||||
|
||||
%$(EXEEXT): %.pas
|
||||
$(COMPILER) $< $(REDIR)
|
||||
$(EXECPASS)
|
||||
|
||||
#####################################################################
|
||||
# Library
|
||||
#####################################################################
|
||||
|
||||
.PHONY: fpc_smart fpc_shared
|
||||
|
||||
# Default sharedlib units are all unit objects
|
||||
ifndef SHAREDLIBUNITOBJECTS
|
||||
SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
|
||||
endif
|
||||
|
||||
fpc_smart:
|
||||
$(MAKE) all SMARTLINK=1
|
||||
|
||||
fpc_shared: all
|
||||
ifdef inlinux
|
||||
ifndef LIBNAME
|
||||
@$(ECHO) "LIBNAME not set"
|
||||
else
|
||||
$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
|
||||
endif
|
||||
else
|
||||
@$(ECHO) "Shared Libraries not supported"
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Install rules
|
||||
#####################################################################
|
||||
|
||||
.PHONY: fpc_showinstall fpc_install
|
||||
|
||||
ifdef EXTRAINSTALLUNITS
|
||||
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
|
||||
endif
|
||||
|
||||
ifdef INSTALLPPUFILES
|
||||
ifdef PPUFILES
|
||||
ifdef inlinux
|
||||
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
|
||||
INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
|
||||
else
|
||||
INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
|
||||
endif
|
||||
else
|
||||
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
|
||||
endif
|
||||
endif
|
||||
|
||||
fpc_showinstall: $(SHOWINSTALLTARGET)
|
||||
ifdef INSTALLEXEFILES
|
||||
@$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
|
||||
endif
|
||||
ifdef INSTALLPPUFILES
|
||||
@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
|
||||
ifneq ($(INSTALLPPULINKFILES),)
|
||||
@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
|
||||
endif
|
||||
ifneq ($(INSTALLPPULIBFILES),)
|
||||
@$(ECHO) -e $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
|
||||
endif
|
||||
endif
|
||||
ifdef EXTRAINSTALLFILES
|
||||
@$(ECHO) -e $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
|
||||
endif
|
||||
|
||||
fpc_install: $(INSTALLTARGET)
|
||||
# Create UnitInstallFiles
|
||||
ifdef INSTALLEXEFILES
|
||||
$(MKDIR) $(BININSTALLDIR)
|
||||
# Compress the exes if upx is defined
|
||||
ifdef UPXPROG
|
||||
-$(UPXPROG) $(INSTALLEXEFILES)
|
||||
endif
|
||||
$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
|
||||
endif
|
||||
ifdef INSTALLPPUFILES
|
||||
$(MKDIR) $(UNITINSTALLDIR)
|
||||
$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
|
||||
ifneq ($(INSTALLPPULINKFILES),)
|
||||
$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
|
||||
endif
|
||||
ifneq ($(INSTALLPPULIBFILES),)
|
||||
$(MKDIR) $(LIBINSTALLDIR)
|
||||
$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
ifdef EXTRAINSTALLFILES
|
||||
$(MKDIR) $(EXTRAINSTALLDIR)
|
||||
$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Source install rules
|
||||
#####################################################################
|
||||
|
||||
.PHONY: fpc_sourceinstall
|
||||
|
||||
fpc_sourceinstall: clean
|
||||
$(MKDIR) $(SOURCEINSTALLDIR)
|
||||
$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
|
||||
|
||||
#####################################################################
|
||||
# Zip
|
||||
#####################################################################
|
||||
|
||||
.PHONY: fpc_zipinstall fpc_zipinstalladd
|
||||
|
||||
# Temporary path to pack a file
|
||||
ifndef PACKDIR
|
||||
ifndef inlinux
|
||||
PACKDIR=pack_tmp
|
||||
else
|
||||
PACKDIR=/tmp/fpc-pack
|
||||
endif
|
||||
endif
|
||||
|
||||
# Test dir if none specified
|
||||
ifndef DESTZIPDIR
|
||||
DESTZIPDIR:=$(BASEDIR)
|
||||
endif
|
||||
|
||||
# Add .zip/.tar.gz extension
|
||||
ifdef ZIPNAME
|
||||
ifndef inlinux
|
||||
override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Note: This will not remove the zipfile first
|
||||
fpc_zipinstalladd:
|
||||
ifndef ZIPNAME
|
||||
@$(ECHO) "Please specify ZIPNAME!"
|
||||
@exit 1
|
||||
else
|
||||
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
|
||||
ifdef inlinux
|
||||
gzip -d $(DESTZIPDIR)/$(ZIPNAME).tar.gz
|
||||
cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
|
||||
gzip $(DESTZIPDIR)/$(ZIPNAME).tar
|
||||
else
|
||||
cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
|
||||
endif
|
||||
$(DELTREE) $(PACKDIR)
|
||||
endif
|
||||
|
||||
# First remove the zip and then install
|
||||
fpc_zipinstall:
|
||||
ifndef ZIPNAME
|
||||
@$(ECHO) "Please specify ZIPNAME!"
|
||||
@exit 1
|
||||
else
|
||||
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)
|
||||
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
|
||||
ifdef inlinux
|
||||
cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
|
||||
else
|
||||
cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
|
||||
endif
|
||||
$(DELTREE) $(PACKDIR)
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Clean rules
|
||||
#####################################################################
|
||||
|
||||
.PHONY: fpc_clean fpc_cleanall
|
||||
|
||||
ifdef EXTRACLEANUNITS
|
||||
override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
|
||||
endif
|
||||
|
||||
ifdef CLEANPPUFILES
|
||||
ifdef PPUFILES
|
||||
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
|
||||
else
|
||||
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
|
||||
endif
|
||||
endif
|
||||
|
||||
fpc_clean: $(CLEANTARGET)
|
||||
ifdef CLEANEXEFILES
|
||||
-$(DEL) $(CLEANEXEFILES)
|
||||
endif
|
||||
ifdef CLEANPPUFILES
|
||||
-$(DEL) $(CLEANPPUFILES)
|
||||
endif
|
||||
ifneq ($(CLEANPPULINKFILES),)
|
||||
-$(DEL) $(CLEANPPULINKFILES)
|
||||
endif
|
||||
ifdef EXTRACLEANFILES
|
||||
-$(DEL) $(EXTRACLEANFILES)
|
||||
endif
|
||||
-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
|
||||
|
||||
fpc_cleanall: $(CLEANTARGET)
|
||||
ifdef CLEANEXEFILES
|
||||
-$(DEL) $(CLEANEXEFILES)
|
||||
endif
|
||||
-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
|
||||
-$(DELTREE) *$(SMARTEXT)
|
||||
-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
|
||||
|
||||
#####################################################################
|
||||
# Info rules
|
||||
#####################################################################
|
||||
|
||||
.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
|
||||
fpc_dirinfo
|
||||
|
||||
fpc_info: $(INFOTARGET)
|
||||
|
||||
fpc_infocfg:
|
||||
@$(ECHO)
|
||||
@$(ECHO) == Configuration info ==
|
||||
@$(ECHO)
|
||||
@$(ECHO) FPC....... $(FPC)
|
||||
@$(ECHO) Version... $(FPC_VERSION)
|
||||
@$(ECHO) CPU....... $(CPU_TARGET)
|
||||
@$(ECHO) Source.... $(OS_SOURCE)
|
||||
@$(ECHO) Target.... $(OS_TARGET)
|
||||
@$(ECHO)
|
||||
|
||||
fpc_infoobjects:
|
||||
@$(ECHO)
|
||||
@$(ECHO) == Object info ==
|
||||
@$(ECHO)
|
||||
@$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
|
||||
@$(ECHO) UnitObjects....... $(UNITOBJECTS)
|
||||
@$(ECHO) ExeObjects........ $(EXEOBJECTS)
|
||||
@$(ECHO)
|
||||
@$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
|
||||
@$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
|
||||
@$(ECHO)
|
||||
@$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
|
||||
@$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
|
||||
@$(ECHO)
|
||||
|
||||
fpc_infoinstall:
|
||||
@$(ECHO)
|
||||
@$(ECHO) == Install info ==
|
||||
@$(ECHO)
|
||||
ifdef DATE
|
||||
@$(ECHO) DateStr.............. $(DATESTR)
|
||||
endif
|
||||
@$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
|
||||
@$(ECHO)
|
||||
@$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
|
||||
@$(ECHO) BinInstallDir........ $(BININSTALLDIR)
|
||||
@$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
|
||||
@$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
|
||||
@$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
|
||||
@$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
|
||||
@$(ECHO) ExtraInstallDir...... $(EXTRAINSTALLDIR)
|
||||
@$(ECHO)
|
||||
|
9
packages/x11/Makefile.fpc
Normal file
9
packages/x11/Makefile.fpc
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# Makefile.fpc for X11 Bindings
|
||||
#
|
||||
|
||||
[targets]
|
||||
units=x xresource xlib xutil
|
||||
|
||||
[dirs]
|
||||
fpcdir=../..
|
568
packages/x11/x.pp
Normal file
568
packages/x11/x.pp
Normal file
@ -0,0 +1,568 @@
|
||||
unit x;
|
||||
|
||||
{ Changes to the original conversion marked MVC - Michael Van Canneyt}
|
||||
|
||||
{$LinkLib X11}
|
||||
|
||||
interface
|
||||
|
||||
const
|
||||
X_PROTOCOL = 11;
|
||||
|
||||
X_PROTOCOL_REVISION = 0;
|
||||
|
||||
|
||||
type
|
||||
{ Inserted the following by hand. It was under a ifndef _XSERVER64. All
|
||||
were unsigned longs originally
|
||||
-- MVC. }
|
||||
TXID = cardinal ;
|
||||
TMask = cardinal ;
|
||||
TAtom = cardinal ;
|
||||
TVisualID = cardinal ;
|
||||
TTime = cardinal ;
|
||||
{ End of insert }
|
||||
TWindow = TXID;
|
||||
TDrawable = TXID;
|
||||
TFont = TXID;
|
||||
TPixmap = TXID;
|
||||
TCursor = TXID;
|
||||
TColormap = TXID;
|
||||
TGContext = TXID;
|
||||
TKeySym = TXID;
|
||||
TKeyCode = char;
|
||||
PKeyCode = ^TKeyCode;
|
||||
{ Pointers to all these things. Needed for C calls. MVC }
|
||||
PAtom = ^TAtom;
|
||||
PPAtom = ^PAtom;
|
||||
PWindow = ^TWindow;
|
||||
PColormap = ^TColormap;
|
||||
PKeySym = ^TKeysym;
|
||||
PPixmap = ^TPixmap;
|
||||
|
||||
{*****************************************************************
|
||||
* RESERVED RESOURCE AND CONSTANT DEFINITIONS
|
||||
*****************************************************************}
|
||||
{* universal null resource or null atom *}
|
||||
|
||||
const
|
||||
None = 0;
|
||||
{* background pixmap in CreateWindow
|
||||
and ChangeWindowAttributes *}
|
||||
ParentRelative = 1;
|
||||
{* border pixmap in CreateWindow
|
||||
and ChangeWindowAttributes
|
||||
special VisualID and special window
|
||||
class passed to CreateWindow *}
|
||||
CopyFromParent = 0;
|
||||
{* destination window in SendEvent *}
|
||||
PointerWindow = 0;
|
||||
{* destination window in SendEvent *}
|
||||
InputFocus = 1;
|
||||
{* focus window in SetInputFocus *}
|
||||
PointerRoot = 1;
|
||||
{* special Atom, passed to GetProperty *}
|
||||
AnyPropertyType = 0;
|
||||
{* special Key Code, passed to GrabKey *}
|
||||
AnyKey = 0;
|
||||
{* special Button Code, passed to GrabButton *}
|
||||
AnyButton = 0;
|
||||
{* special Resource ID passed to KillClient *}
|
||||
AllTemporary = 0;
|
||||
{* special Time *}
|
||||
CurrentTime = 0;
|
||||
{* special KeySym *}
|
||||
{*****************************************************************
|
||||
* EVENT DEFINITIONS
|
||||
*****************************************************************}
|
||||
{* Input Event Masks. Used as event-mask window attribute and as arguments
|
||||
to Grab requests. Not to be confused with event names. *}
|
||||
NoSymbol = 0;
|
||||
NoEventMask = 0;
|
||||
KeyPressMask = (1) shl (0);
|
||||
KeyReleaseMask = (1) shl (1);
|
||||
ButtonPressMask = (1) shl (2);
|
||||
ButtonReleaseMask = (1) shl (3);
|
||||
EnterWindowMask = (1) shl (4);
|
||||
LeaveWindowMask = (1) shl (5);
|
||||
PointerMotionMask = (1) shl (6);
|
||||
PointerMotionHintMask = (1) shl (7);
|
||||
Button1MotionMask = (1) shl (8);
|
||||
Button2MotionMask = (1) shl (9);
|
||||
Button3MotionMask = (1) shl (10);
|
||||
Button4MotionMask = (1) shl (11);
|
||||
Button5MotionMask = (1) shl (12);
|
||||
ButtonMotionMask = (1) shl (13);
|
||||
KeymapStateMask = (1) shl (14);
|
||||
ExposureMask = (1) shl (15);
|
||||
VisibilityChangeMask = (1) shl (16);
|
||||
StructureNotifyMask = (1) shl (17);
|
||||
ResizeRedirectMask = (1) shl (18);
|
||||
SubstructureNotifyMask = (1) shl (19);
|
||||
SubstructureRedirectMask = (1) shl (20);
|
||||
FocusChangeMask = (1) shl (21);
|
||||
PropertyChangeMask = (1) shl (22);
|
||||
ColormapChangeMask = (1) shl (23);
|
||||
{* Event names. Used in "type" field in XEvent structures. Not to be
|
||||
confused with event masks above. They start from 2 because 0 and 1
|
||||
are reserved in the protocol for errors and replies. *}
|
||||
OwnerGrabButtonMask = (1) shl (24);
|
||||
KeyPress = 2;
|
||||
KeyRelease = 3;
|
||||
ButtonPress = 4;
|
||||
ButtonRelease = 5;
|
||||
MotionNotify = 6;
|
||||
EnterNotify = 7;
|
||||
LeaveNotify = 8;
|
||||
FocusIn = 9;
|
||||
FocusOut = 10;
|
||||
KeymapNotify = 11;
|
||||
Expose = 12;
|
||||
GraphicsExpose = 13;
|
||||
NoExpose = 14;
|
||||
VisibilityNotify = 15;
|
||||
CreateNotify = 16;
|
||||
DestroyNotify = 17;
|
||||
UnmapNotify = 18;
|
||||
MapNotify = 19;
|
||||
MapRequest = 20;
|
||||
ReparentNotify = 21;
|
||||
ConfigureNotify = 22;
|
||||
ConfigureRequest = 23;
|
||||
GravityNotify = 24;
|
||||
ResizeRequest = 25;
|
||||
CirculateNotify = 26;
|
||||
CirculateRequest = 27;
|
||||
PropertyNotify = 28;
|
||||
SelectionClear = 29;
|
||||
SelectionRequest = 30;
|
||||
SelectionNotify = 31;
|
||||
ColormapNotify = 32;
|
||||
ClientMessage = 33;
|
||||
MappingNotify = 34;
|
||||
{* must be bigger than any event # *}
|
||||
{* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
|
||||
state in various key-, mouse-, and button-related events. *}
|
||||
LASTEvent = 35;
|
||||
ShiftMask = (1) shl (0);
|
||||
LockMask = (1) shl (1);
|
||||
ControlMask = (1) shl (2);
|
||||
Mod1Mask = (1) shl (3);
|
||||
Mod2Mask = (1) shl (4);
|
||||
Mod3Mask = (1) shl (5);
|
||||
Mod4Mask = (1) shl (6);
|
||||
{* modifier names. Used to build a SetModifierMapping request or
|
||||
to read a GetModifierMapping request. These correspond to the
|
||||
masks defined above. *}
|
||||
Mod5Mask = (1) shl (7);
|
||||
ShiftMapIndex = 0;
|
||||
LockMapIndex = 1;
|
||||
ControlMapIndex = 2;
|
||||
Mod1MapIndex = 3;
|
||||
Mod2MapIndex = 4;
|
||||
Mod3MapIndex = 5;
|
||||
Mod4MapIndex = 6;
|
||||
{* button masks. Used in same manner as Key masks above. Not to be confused
|
||||
with button names below. *}
|
||||
Mod5MapIndex = 7;
|
||||
Button1Mask = (1) shl (8);
|
||||
Button2Mask = (1) shl (9);
|
||||
Button3Mask = (1) shl (10);
|
||||
Button4Mask = (1) shl (11);
|
||||
Button5Mask = (1) shl (12);
|
||||
{* used in GrabButton, GrabKey *}
|
||||
{* button names. Used as arguments to GrabButton and as detail in ButtonPress
|
||||
and ButtonRelease events. Not to be confused with button masks above.
|
||||
Note that 0 is already defined above as "AnyButton". *}
|
||||
AnyModifier = (1) shl (15);
|
||||
Button1 = 1;
|
||||
Button2 = 2;
|
||||
Button3 = 3;
|
||||
Button4 = 4;
|
||||
{* Notify modes *}
|
||||
Button5 = 5;
|
||||
NotifyNormal = 0;
|
||||
NotifyGrab = 1;
|
||||
NotifyUngrab = 2;
|
||||
NotifyWhileGrabbed = 3;
|
||||
{* for MotionNotify events *}
|
||||
{* Notify detail *}
|
||||
NotifyHint = 1;
|
||||
NotifyAncestor = 0;
|
||||
NotifyVirtual = 1;
|
||||
NotifyInferior = 2;
|
||||
NotifyNonlinear = 3;
|
||||
NotifyNonlinearVirtual = 4;
|
||||
NotifyPointer = 5;
|
||||
NotifyPointerRoot = 6;
|
||||
{* Visibility notify *}
|
||||
NotifyDetailNone = 7;
|
||||
VisibilityUnobscured = 0;
|
||||
VisibilityPartiallyObscured = 1;
|
||||
{* Circulation request *}
|
||||
VisibilityFullyObscured = 2;
|
||||
PlaceOnTop = 0;
|
||||
{* protocol families *}
|
||||
PlaceOnBottom = 1;
|
||||
FamilyInternet = 0;
|
||||
FamilyDECnet = 1;
|
||||
{* Property notification *}
|
||||
FamilyChaos = 2;
|
||||
PropertyNewValue = 0;
|
||||
{* Color Map notification *}
|
||||
PropertyDelete = 1;
|
||||
ColormapUninstalled = 0;
|
||||
{* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes *}
|
||||
ColormapInstalled = 1;
|
||||
GrabModeSync = 0;
|
||||
{* GrabPointer, GrabKeyboard reply status *}
|
||||
GrabModeAsync = 1;
|
||||
GrabSuccess = 0;
|
||||
AlreadyGrabbed = 1;
|
||||
GrabInvalidTime = 2;
|
||||
GrabNotViewable = 3;
|
||||
{* AllowEvents modes *}
|
||||
GrabFrozen = 4;
|
||||
AsyncPointer = 0;
|
||||
SyncPointer = 1;
|
||||
ReplayPointer = 2;
|
||||
AsyncKeyboard = 3;
|
||||
SyncKeyboard = 4;
|
||||
ReplayKeyboard = 5;
|
||||
AsyncBoth = 6;
|
||||
{* Used in SetInputFocus, GetInputFocus *}
|
||||
SyncBoth = 7;
|
||||
{*****************************************************************
|
||||
* ERROR CODES
|
||||
*****************************************************************}
|
||||
RevertToParent = 2;
|
||||
{* everything's okay *}
|
||||
Success = 0;
|
||||
{* bad request code *}
|
||||
BadRequest = 1;
|
||||
{* int parameter out of range *}
|
||||
BadValue = 2;
|
||||
{* parameter not a Window *}
|
||||
BadWindow = 3;
|
||||
{* parameter not a Pixmap *}
|
||||
BadPixmap = 4;
|
||||
{* parameter not an Atom *}
|
||||
BadAtom = 5;
|
||||
{* parameter not a Cursor *}
|
||||
BadCursor = 6;
|
||||
{* parameter not a Font *}
|
||||
BadFont = 7;
|
||||
{* parameter mismatch *}
|
||||
BadMatch = 8;
|
||||
{* parameter not a Pixmap or Window *}
|
||||
BadDrawable = 9;
|
||||
{* depending on context:
|
||||
- key/button already grabbed
|
||||
- attempt to free an illegal
|
||||
cmap entry
|
||||
- attempt to store into a read-only
|
||||
color map entry.
|
||||
- attempt to modify the access control
|
||||
list from other than the local host.
|
||||
*}
|
||||
BadAccess = 10;
|
||||
{* insufficient resources *}
|
||||
BadAlloc = 11;
|
||||
{* no such colormap *}
|
||||
BadColor = 12;
|
||||
{* parameter not a GC *}
|
||||
BadGC = 13;
|
||||
{* choice not in range or already used *}
|
||||
BadIDChoice = 14;
|
||||
{* font or color name doesn't exist *}
|
||||
BadName = 15;
|
||||
{* Request length incorrect *}
|
||||
BadLength = 16;
|
||||
{* server is defective *}
|
||||
BadImplementation = 17;
|
||||
FirstExtensionError = 128;
|
||||
{*****************************************************************
|
||||
* WINDOW DEFINITIONS
|
||||
*****************************************************************}
|
||||
{* Window classes used by CreateWindow *}
|
||||
{* Note that CopyFromParent is already defined as 0 above *}
|
||||
LastExtensionError = 255;
|
||||
InputOutput = 1;
|
||||
{* Window attributes for CreateWindow and ChangeWindowAttributes *}
|
||||
InputOnly = 2;
|
||||
CWBackPixmap = (1) shl (0);
|
||||
CWBackPixel = (1) shl (1);
|
||||
CWBorderPixmap = (1) shl (2);
|
||||
CWBorderPixel = (1) shl (3);
|
||||
CWBitGravity = (1) shl (4);
|
||||
CWWinGravity = (1) shl (5);
|
||||
CWBackingStore = (1) shl (6);
|
||||
CWBackingPlanes = (1) shl (7);
|
||||
CWBackingPixel = (1) shl (8);
|
||||
CWOverrideRedirect = (1) shl (9);
|
||||
CWSaveUnder = (1) shl (10);
|
||||
CWEventMask = (1) shl (11);
|
||||
CWDontPropagate = (1) shl (12);
|
||||
CWColormap = (1) shl (13);
|
||||
{* ConfigureWindow structure *}
|
||||
CWCursor = (1) shl (14);
|
||||
CWX = (1) shl (0);
|
||||
CWY = (1) shl (1);
|
||||
CWWidth = (1) shl (2);
|
||||
CWHeight = (1) shl (3);
|
||||
CWBorderWidth = (1) shl (4);
|
||||
CWSibling = (1) shl (5);
|
||||
{* Bit Gravity *}
|
||||
CWStackMode = (1) shl (6);
|
||||
ForgetGravity = 0;
|
||||
NorthWestGravity = 1;
|
||||
NorthGravity = 2;
|
||||
NorthEastGravity = 3;
|
||||
WestGravity = 4;
|
||||
CenterGravity = 5;
|
||||
EastGravity = 6;
|
||||
SouthWestGravity = 7;
|
||||
SouthGravity = 8;
|
||||
SouthEastGravity = 9;
|
||||
{* Window gravity + bit gravity above *}
|
||||
StaticGravity = 10;
|
||||
{* Used in CreateWindow for backing-store hint *}
|
||||
UnmapGravity = 0;
|
||||
NotUseful = 0;
|
||||
WhenMapped = 1;
|
||||
{* Used in GetWindowAttributes reply *}
|
||||
Always = 2;
|
||||
IsUnmapped = 0;
|
||||
IsUnviewable = 1;
|
||||
{* Used in ChangeSaveSet *}
|
||||
IsViewable = 2;
|
||||
SetModeInsert = 0;
|
||||
{* Used in ChangeCloseDownMode *}
|
||||
SetModeDelete = 1;
|
||||
DestroyAll = 0;
|
||||
RetainPermanent = 1;
|
||||
{* Window stacking method (in configureWindow) *}
|
||||
RetainTemporary = 2;
|
||||
Above = 0;
|
||||
Below = 1;
|
||||
TopIf = 2;
|
||||
BottomIf = 3;
|
||||
{* Circulation direction *}
|
||||
Opposite = 4;
|
||||
RaiseLowest = 0;
|
||||
{* Property modes *}
|
||||
LowerHighest = 1;
|
||||
PropModeReplace = 0;
|
||||
PropModePrepend = 1;
|
||||
{*****************************************************************
|
||||
* GRAPHICS DEFINITIONS
|
||||
*****************************************************************}
|
||||
{* graphics functions, as in GC.alu *}
|
||||
PropModeAppend = 2;
|
||||
{* 0 *}
|
||||
GXclear = $0;
|
||||
{* src AND dst *}
|
||||
GXand = $1;
|
||||
{* src AND NOT dst *}
|
||||
GXandReverse = $2;
|
||||
{* src *}
|
||||
GXcopy = $3;
|
||||
{* NOT src AND dst *}
|
||||
GXandInverted = $4;
|
||||
{* dst *}
|
||||
GXnoop = $5;
|
||||
{* src XOR dst *}
|
||||
GXxor = $6;
|
||||
{* src OR dst *}
|
||||
GXor = $7;
|
||||
{* NOT src AND NOT dst *}
|
||||
GXnor = $8;
|
||||
{* NOT src XOR dst *}
|
||||
GXequiv = $9;
|
||||
{* NOT dst *}
|
||||
GXinvert = $a;
|
||||
{* src OR NOT dst *}
|
||||
GXorReverse = $b;
|
||||
{* NOT src *}
|
||||
GXcopyInverted = $c;
|
||||
{* NOT src OR dst *}
|
||||
GXorInverted = $d;
|
||||
{* NOT src OR NOT dst *}
|
||||
GXnand = $e;
|
||||
{* 1 *}
|
||||
{* LineStyle *}
|
||||
GXset = $f;
|
||||
LineSolid = 0;
|
||||
LineOnOffDash = 1;
|
||||
{* capStyle *}
|
||||
LineDoubleDash = 2;
|
||||
CapNotLast = 0;
|
||||
CapButt = 1;
|
||||
CapRound = 2;
|
||||
{* joinStyle *}
|
||||
CapProjecting = 3;
|
||||
JoinMiter = 0;
|
||||
JoinRound = 1;
|
||||
{* fillStyle *}
|
||||
JoinBevel = 2;
|
||||
FillSolid = 0;
|
||||
FillTiled = 1;
|
||||
FillStippled = 2;
|
||||
{* fillRule *}
|
||||
FillOpaqueStippled = 3;
|
||||
EvenOddRule = 0;
|
||||
{* subwindow mode *}
|
||||
WindingRule = 1;
|
||||
ClipByChildren = 0;
|
||||
{* SetClipRectangles ordering *}
|
||||
IncludeInferiors = 1;
|
||||
Unsorted = 0;
|
||||
YSorted = 1;
|
||||
YXSorted = 2;
|
||||
{* CoordinateMode for drawing routines *}
|
||||
YXBanded = 3;
|
||||
{* relative to the origin *}
|
||||
CoordModeOrigin = 0;
|
||||
{* relative to previous point *}
|
||||
{* Polygon shapes *}
|
||||
CoordModePrevious = 1;
|
||||
{* paths may intersect *}
|
||||
Complex = 0;
|
||||
{* no paths intersect, but not convex *}
|
||||
Nonconvex = 1;
|
||||
{* wholly convex *}
|
||||
{* Arc modes for PolyFillArc *}
|
||||
Convex = 2;
|
||||
{* join endpoints of arc *}
|
||||
ArcChord = 0;
|
||||
{* join endpoints to center of arc *}
|
||||
{* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
|
||||
GC.stateChanges *}
|
||||
ArcPieSlice = 1;
|
||||
GCFunction = (1) shl (0);
|
||||
GCPlaneMask = (1) shl (1);
|
||||
GCForeground = (1) shl (2);
|
||||
GCBackground = (1) shl (3);
|
||||
GCLineWidth = (1) shl (4);
|
||||
GCLineStyle = (1) shl (5);
|
||||
GCCapStyle = (1) shl (6);
|
||||
GCJoinStyle = (1) shl (7);
|
||||
GCFillStyle = (1) shl (8);
|
||||
GCFillRule = (1) shl (9);
|
||||
GCTile = (1) shl (10);
|
||||
GCStipple = (1) shl (11);
|
||||
GCTileStipXOrigin = (1) shl (12);
|
||||
GCTileStipYOrigin = (1) shl (13);
|
||||
GCFont = (1) shl (14);
|
||||
GCSubwindowMode = (1) shl (15);
|
||||
GCGraphicsExposures = (1) shl (16);
|
||||
GCClipXOrigin = (1) shl (17);
|
||||
GCClipYOrigin = (1) shl (18);
|
||||
GCClipMask = (1) shl (19);
|
||||
GCDashOffset = (1) shl (20);
|
||||
GCDashList = (1) shl (21);
|
||||
GCArcMode = (1) shl (22);
|
||||
{*****************************************************************
|
||||
* FONTS
|
||||
*****************************************************************}
|
||||
{* used in QueryFont -- draw direction *}
|
||||
GCLastBit = 22;
|
||||
FontLeftToRight = 0;
|
||||
FontRightToLeft = 1;
|
||||
{*****************************************************************
|
||||
* IMAGING
|
||||
*****************************************************************}
|
||||
{* ImageFormat -- PutImage, GetImage *}
|
||||
FontChange = 255;
|
||||
{* depth 1, XYFormat *}
|
||||
XYBitmap = 0;
|
||||
{* depth == drawable depth *}
|
||||
XYPixmap = 1;
|
||||
{* depth == drawable depth *}
|
||||
{*****************************************************************
|
||||
* COLOR MAP STUFF
|
||||
*****************************************************************}
|
||||
{* For CreateColormap *}
|
||||
ZPixmap = 2;
|
||||
{* create map with no entries *}
|
||||
AllocNone = 0;
|
||||
{* allocate entire map writeable *}
|
||||
{* Flags used in StoreNamedColor, StoreColors *}
|
||||
AllocAll = 1;
|
||||
DoRed = (1) shl (0);
|
||||
DoGreen = (1) shl (1);
|
||||
{*****************************************************************
|
||||
* CURSOR STUFF
|
||||
*****************************************************************}
|
||||
{* QueryBestSize Class *}
|
||||
DoBlue = (1) shl (2);
|
||||
{* largest size that can be displayed *}
|
||||
CursorShape = 0;
|
||||
{* size tiled fastest *}
|
||||
TileShape = 1;
|
||||
{* size stippled fastest *}
|
||||
{*****************************************************************
|
||||
* KEYBOARD/POINTER STUFF
|
||||
*****************************************************************}
|
||||
StippleShape = 2;
|
||||
AutoRepeatModeOff = 0;
|
||||
AutoRepeatModeOn = 1;
|
||||
AutoRepeatModeDefault = 2;
|
||||
LedModeOff = 0;
|
||||
{* masks for ChangeKeyboardControl *}
|
||||
LedModeOn = 1;
|
||||
KBKeyClickPercent = (1) shl (0);
|
||||
KBBellPercent = (1) shl (1);
|
||||
KBBellPitch = (1) shl (2);
|
||||
KBBellDuration = (1) shl (3);
|
||||
KBLed = (1) shl (4);
|
||||
KBLedMode = (1) shl (5);
|
||||
KBKey = (1) shl (6);
|
||||
KBAutoRepeatMode = (1) shl (7);
|
||||
MappingSuccess = 0;
|
||||
MappingBusy = 1;
|
||||
MappingFailed = 2;
|
||||
MappingModifier = 0;
|
||||
MappingKeyboard = 1;
|
||||
{*****************************************************************
|
||||
* SCREEN SAVER STUFF
|
||||
*****************************************************************}
|
||||
MappingPointer = 2;
|
||||
DontPreferBlanking = 0;
|
||||
PreferBlanking = 1;
|
||||
DefaultBlanking = 2;
|
||||
DisableScreenSaver = 0;
|
||||
DisableScreenInterval = 0;
|
||||
DontAllowExposures = 0;
|
||||
AllowExposures = 1;
|
||||
{* for ForceScreenSaver *}
|
||||
DefaultExposures = 2;
|
||||
ScreenSaverReset = 0;
|
||||
{*****************************************************************
|
||||
* HOSTS AND CONNECTIONS
|
||||
*****************************************************************}
|
||||
{* for ChangeHosts *}
|
||||
ScreenSaverActive = 1;
|
||||
HostInsert = 0;
|
||||
{* for ChangeAccessControl *}
|
||||
HostDelete = 1;
|
||||
EnableAccess = 1;
|
||||
{* Display classes used in opening the connection
|
||||
* Note that the statically allocated ones are even numbered and the
|
||||
* dynamically changeable ones are odd numbered *}
|
||||
DisableAccess = 0;
|
||||
StaticGray = 0;
|
||||
GrayScale = 1;
|
||||
StaticColor = 2;
|
||||
PseudoColor = 3;
|
||||
TrueColor = 4;
|
||||
{* Byte order used in imageByteOrder and bitmapBitOrder *}
|
||||
DirectColor = 5;
|
||||
LSBFirst = 0;
|
||||
MSBFirst = 1;
|
||||
|
||||
{ Pointer Declarations }
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
2098
packages/x11/xlib.pp
Normal file
2098
packages/x11/xlib.pp
Normal file
File diff suppressed because it is too large
Load Diff
457
packages/x11/xresource.pp
Normal file
457
packages/x11/xresource.pp
Normal file
@ -0,0 +1,457 @@
|
||||
unit xresource;
|
||||
|
||||
interface
|
||||
|
||||
uses xlib;
|
||||
|
||||
|
||||
{***************************************************************
|
||||
*
|
||||
* Quark Management
|
||||
*
|
||||
***************************************************************}
|
||||
|
||||
type
|
||||
TXrmQuark = Integer;
|
||||
PXrmQuark = ^TXrmQuark;
|
||||
TXrmQuarkList = PXrmQuark;
|
||||
|
||||
|
||||
Const NULLQUARK = 0 ;
|
||||
|
||||
type TXrmString = Pchar;
|
||||
|
||||
const NULLSTRING = 0;
|
||||
|
||||
{ find quark for string, create new quark if none already exists }
|
||||
Function XrmStringToQuark( p1 : pchar ) : TXrmQuark;cdecl;
|
||||
|
||||
Function XrmPermStringToQuark( p1 : pchar ) : TXrmQuark;cdecl;
|
||||
|
||||
{ find string for quark }
|
||||
Function XrmQuarkToString( p1 : TXrmQuark) : TXrmString;cdecl;
|
||||
|
||||
|
||||
Function XrmUniqueQuark : TXrmQuark;cdecl;
|
||||
|
||||
{
|
||||
#define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0)
|
||||
}
|
||||
|
||||
{***************************************************************
|
||||
*
|
||||
* Conversion of Strings to Lists
|
||||
*
|
||||
***************************************************************}
|
||||
|
||||
type
|
||||
TXrmBinding = integer;
|
||||
TXrmBindingList = ^Integer;
|
||||
Const XrmBindTightly = 0;
|
||||
XrmBindLoosely = 1;
|
||||
|
||||
procedure XrmStringToQuarkList(
|
||||
p1 : pchar { string };
|
||||
p2 : TXrmQuarkList { quarks_return }
|
||||
);cdecl;
|
||||
|
||||
procedure XrmStringToBindingQuarkList(
|
||||
p1 : pchar { string };
|
||||
p2 : TXrmBindingList { bindings_return };
|
||||
p3 : TXrmQuarkList { quarks_return }
|
||||
);cdecl;
|
||||
|
||||
{***************************************************************
|
||||
*
|
||||
* Name and Class lists.
|
||||
*
|
||||
***************************************************************}
|
||||
|
||||
type TXrmName = TXrmQuark;
|
||||
TXrmNameList = TXrmQuarkList ;
|
||||
{
|
||||
#define XrmNameToString(name) XrmQuarkToString(name)
|
||||
#define XrmStringToName(string) XrmStringToQuark(string)
|
||||
#define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name)
|
||||
}
|
||||
TXrmClass = TXrmQuark;
|
||||
TXrmClassList = TXrmQuarkList;
|
||||
{
|
||||
#define XrmClassToString(c_class) XrmQuarkToString(c_class)
|
||||
#define XrmStringToClass(c_class) XrmStringToQuark(c_class)
|
||||
#define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class)
|
||||
}
|
||||
|
||||
|
||||
{***************************************************************
|
||||
*
|
||||
* Resource Representation Types and Values
|
||||
*
|
||||
***************************************************************}
|
||||
|
||||
type TXrmRepresentation = TXrmQuark ;
|
||||
PXrmRepresentation = ^TXrmRepresentation;
|
||||
{
|
||||
#define XrmStringToRepresentation(string) XrmStringToQuark(string)
|
||||
#define XrmRepresentationToString(type) XrmQuarkToString(type)
|
||||
}
|
||||
|
||||
type TXrmValue = record
|
||||
size : word;
|
||||
theaddr : TXPointer;
|
||||
end;
|
||||
PXrmValue = ^TXrmValue;
|
||||
TXrmValuePtr = PXrmValue;
|
||||
|
||||
|
||||
{***************************************************************
|
||||
*
|
||||
* Resource Manager Functions
|
||||
*
|
||||
***************************************************************}
|
||||
{
|
||||
typedef struct _XrmHashBucketRec *XrmHashBucket;
|
||||
typedef XrmHashBucket *XrmHashTable;
|
||||
typedef XrmHashTable XrmSearchList[];
|
||||
typedef struct _XrmHashBucketRec *XrmDatabase;
|
||||
}
|
||||
Type TXrmHashBucket = pointer;
|
||||
TXrmHashTable = ^TXrmHashBucket;
|
||||
TXrmSearchList = ^TXrmHashTable;
|
||||
TXrmDatabase = pointer;
|
||||
PXrmDatabase = ^TXrmDatabase;
|
||||
|
||||
procedure XrmDestroyDatabase(
|
||||
p1 : TXrmDatabase { database }
|
||||
);cdecl;
|
||||
|
||||
Procedure XrmQPutResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : TXrmBindingList { bindings };
|
||||
p3 : TXrmQuarkList { quarks };
|
||||
p4 : TXrmRepresentation { type };
|
||||
p5 : PXrmValue { value }
|
||||
);cdecl;
|
||||
|
||||
Procedure XrmPutResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : pchar { specifier };
|
||||
p3 : pchar { type };
|
||||
p4 : PXrmValue { value }
|
||||
);cdecl;
|
||||
|
||||
Procedure XrmQPutStringResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : TXrmBindingList { bindings };
|
||||
p3 : TXrmQuarkList { quarks };
|
||||
p4 : Pchar { value }
|
||||
);cdecl;
|
||||
|
||||
Procedure XrmPutStringResource(
|
||||
P1 : PXrmDatabase { database };
|
||||
p2,p3 : pchar
|
||||
);cdecl;
|
||||
|
||||
Procedure XrmPutLineResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : pchar { line }
|
||||
);cdecl;
|
||||
|
||||
Function XrmQGetResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : TXrmNameList { quark_name };
|
||||
p3 : TXrmClassList { quark_class };
|
||||
p4 : PXrmRepresentation { quark_type_return };
|
||||
p5 : PXrmValue { value_return }
|
||||
) : Integer;cdecl;
|
||||
|
||||
Function XrmGetResource(
|
||||
p1 : TXrmDatabase { database };
|
||||
p2 : pchar { str_name };
|
||||
p3 : pchar { str_class };
|
||||
p4 : ppchar { str_type_return };
|
||||
p5 : PXrmValue { value_return }
|
||||
) : Tbool;cdecl;
|
||||
|
||||
Function XrmQGetSearchList(
|
||||
p1 : TXrmDatabase { database };
|
||||
p2 : TXrmNameList { names };
|
||||
p3 : TXrmClassList { classes };
|
||||
p4 : TXrmSearchList { list_return };
|
||||
p5 : integer { list_length }
|
||||
) : Tbool;cdecl;
|
||||
|
||||
Function XrmQGetSearchResource(
|
||||
P1 : TXrmSearchList { list };
|
||||
p2 : TXrmName { name };
|
||||
p3 : TXrmClass { class };
|
||||
p4 : PXrmRepresentation { type_return };
|
||||
p5 : PXrmValue { value_return }
|
||||
) : TBool;cdecl;
|
||||
|
||||
{***************************************************************
|
||||
*
|
||||
* Resource Database Management
|
||||
*
|
||||
***************************************************************}
|
||||
|
||||
procedure XrmSetDatabase(
|
||||
p1 : PDisplay { display };
|
||||
p2 : TXrmDatabase { database }
|
||||
);cdecl;
|
||||
|
||||
Function XrmGetDatabase(
|
||||
p1 : PDisplay { display }
|
||||
) : TXrmDatabase;cdecl;
|
||||
|
||||
Function XrmGetFileDatabase(
|
||||
p1 : pchar { filename }
|
||||
) : TXrmDatabase ;cdecl;
|
||||
|
||||
Function XrmCombineFileDatabase(
|
||||
p1 : pchar { filename };
|
||||
p2 : PXrmDatabase { target };
|
||||
p3 : TBool { override }
|
||||
) : TStatus ;cdecl;
|
||||
|
||||
function XrmGetStringDatabase(
|
||||
p1 : pchar { data } { null terminated string }
|
||||
) : TXrmDatabase ;cdecl;
|
||||
|
||||
Procedure XrmPutFileDatabase(
|
||||
p1 : TXrmDatabase { database };
|
||||
p2: pchar { filename }
|
||||
);cdecl;
|
||||
|
||||
Procedure XrmMergeDatabases(
|
||||
p1 : TXrmDatabase { source_db };
|
||||
p2 : PXrmDatabase { target_db }
|
||||
);cdecl;
|
||||
|
||||
procedure XrmCombineDatabase(
|
||||
p1 : TXrmDatabase { source_db };
|
||||
p2 : PXrmDatabase { target_db };
|
||||
p3 : TBool { override }
|
||||
);cdecl;
|
||||
|
||||
const
|
||||
XrmEnumAllLevels = 0;
|
||||
XrmEnumOneLevel = 1;
|
||||
{
|
||||
Function XrmEnumerateDatabase(
|
||||
XrmDatabase { db };
|
||||
XrmNameList { name_prefix };
|
||||
XrmClassList { class_prefix };
|
||||
int { mode };
|
||||
Bool (*)(#if NeedNestedPrototypes
|
||||
XrmDatabase* { db };
|
||||
XrmBindingList { bindings };
|
||||
XrmQuarkList { quarks };
|
||||
XrmRepresentation* { type };
|
||||
XrmValue* { value };
|
||||
XPointer { closure }
|
||||
|
||||
) { proc };
|
||||
XPointer { closure }
|
||||
) : TBool;
|
||||
}
|
||||
|
||||
Function XrmLocaleOfDatabase(
|
||||
P1 : TXrmDatabase { database }
|
||||
) : Pchar;cdecl;
|
||||
|
||||
|
||||
{***************************************************************
|
||||
*
|
||||
* Command line option mapping to resource entries
|
||||
*
|
||||
***************************************************************}
|
||||
|
||||
Const
|
||||
XrmoptionNoArg = 0; { Value is specified in OptionDescRec.value }
|
||||
XrmoptionIsArg = 1; { Value is the option string itself }
|
||||
XrmoptionStickyArg = 2; { Value is characters immediately following option }
|
||||
XrmoptionSepArg = 3; { Value is next argument in argv }
|
||||
XrmoptionResArg = 4; { Resource and value in next argument in argv }
|
||||
XrmoptionSkipArg = 5; { Ignore this option and the next argument in argv }
|
||||
XrmoptionSkipLine = 6; { Ignore this option and the rest of argv }
|
||||
XrmoptionSkipNArgs = 7; { Ignore this option and the next
|
||||
OptionDescRes.value arguments in argv }
|
||||
Type TXrmOptionKind = Integer;
|
||||
|
||||
TXrmOptionDescRec = record
|
||||
option : pchar; { Option abbreviation in argv }
|
||||
specifier : pchar; { Resource specifier }
|
||||
argKind : TXrmOptionKind; { Which style of option it is }
|
||||
value : TXpointer; { Value to provide if XrmoptionNoArg }
|
||||
end;
|
||||
PXrmOptionDescRec= ^TXrmOptionDescRec;
|
||||
TXrmOptionDescList = PXrmOptionDescRec;
|
||||
|
||||
|
||||
Procedure XrmParseCommand(
|
||||
p1 : TXrmDatabase { database };
|
||||
p2 : TXrmOptionDescList { table };
|
||||
p3 : integer { table_count };
|
||||
p4 : pchar { name };
|
||||
p5 : Pointer { argc_in_out };
|
||||
p6 : ppchar { argv_in_out }
|
||||
);cdecl;
|
||||
|
||||
Implementation
|
||||
|
||||
Function XrmStringToQuark( p1 : pchar ) : TXrmQuark; cdecl; external;
|
||||
Function XrmPermStringToQuark( p1 : pchar ) : TXrmQuark; cdecl; external;
|
||||
Function XrmQuarkToString( p1 : TXrmQuark) : TXrmString; cdecl; external;
|
||||
|
||||
Function XrmUniqueQuark : TXrmQuark; cdecl; external;
|
||||
procedure XrmStringToQuarkList(
|
||||
p1 : pchar { string };
|
||||
p2 : TXrmQuarkList { quarks_return }
|
||||
); cdecl; external;
|
||||
|
||||
procedure XrmStringToBindingQuarkList(
|
||||
p1 : pchar { string };
|
||||
p2 : TXrmBindingList { bindings_return };
|
||||
p3 : TXrmQuarkList { quarks_return }
|
||||
); cdecl; external;
|
||||
procedure XrmDestroyDatabase(
|
||||
p1 : TXrmDatabase { database }
|
||||
); cdecl; external;
|
||||
|
||||
Procedure XrmQPutResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : TXrmBindingList { bindings };
|
||||
p3 : TXrmQuarkList { quarks };
|
||||
p4 : TXrmRepresentation { type };
|
||||
p5 : PXrmValue { value }
|
||||
); cdecl; external;
|
||||
|
||||
Procedure XrmPutResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : pchar { specifier };
|
||||
p3 : pchar { type };
|
||||
p4 : PXrmValue { value }
|
||||
); cdecl; external;
|
||||
|
||||
Procedure XrmQPutStringResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : TXrmBindingList { bindings };
|
||||
p3 : TXrmQuarkList { quarks };
|
||||
p4 : Pchar { value }
|
||||
); cdecl; external;
|
||||
|
||||
procedure XrmPutStringResource(
|
||||
P1 : PXrmDatabase { database };
|
||||
p2,p3 : pchar
|
||||
); cdecl; external;
|
||||
|
||||
Procedure XrmPutLineResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : pchar { line }
|
||||
); cdecl; external;
|
||||
|
||||
Function XrmQGetResource(
|
||||
p1 : PXrmDatabase { database };
|
||||
p2 : TXrmNameList { quark_name };
|
||||
p3 : TXrmClassList { quark_class };
|
||||
p4 : PXrmRepresentation { quark_type_return };
|
||||
p5 : PXrmValue { value_return }
|
||||
) : Integer; cdecl; external;
|
||||
|
||||
Function XrmGetResource(
|
||||
p1 : TXrmDatabase { database };
|
||||
p2 : pchar { str_name };
|
||||
p3 : pchar { str_class };
|
||||
p4 : ppchar { str_type_return };
|
||||
p5 : PXrmValue { value_return }
|
||||
) : Tbool; cdecl; external;
|
||||
|
||||
Function XrmQGetSearchList(
|
||||
p1 : TXrmDatabase { database };
|
||||
p2 : TXrmNameList { names };
|
||||
p3 : TXrmClassList { classes };
|
||||
p4 : TXrmSearchList { list_return };
|
||||
p5 : integer { list_length }
|
||||
) : Tbool; cdecl; external;
|
||||
|
||||
Function XrmQGetSearchResource(
|
||||
P1 : TXrmSearchList { list };
|
||||
p2 : TXrmName { name };
|
||||
p3 : TXrmClass { class };
|
||||
p4 : PXrmRepresentation { type_return };
|
||||
p5 : PXrmValue { value_return }
|
||||
) : TBool; cdecl; external;
|
||||
|
||||
procedure XrmSetDatabase(
|
||||
p1 : PDisplay { display };
|
||||
p2 : TXrmDatabase { database }
|
||||
); cdecl; external;
|
||||
|
||||
Function XrmGetDatabase(
|
||||
p1 : PDisplay { display }
|
||||
) : TXrmDatabase; cdecl; external;
|
||||
|
||||
Function XrmGetFileDatabase(
|
||||
p1 : pchar { filename }
|
||||
) : TXrmDatabase ; cdecl; external;
|
||||
|
||||
Function XrmCombineFileDatabase(
|
||||
p1 : pchar { filename };
|
||||
p2 : PXrmDatabase { target };
|
||||
p3 : TBool { override }
|
||||
) : TStatus ; cdecl; external;
|
||||
|
||||
function XrmGetStringDatabase(
|
||||
p1 : pchar { data } { null terminated string }
|
||||
) : TXrmDatabase ; cdecl; external;
|
||||
|
||||
Procedure XrmPutFileDatabase(
|
||||
p1 : TXrmDatabase { database };
|
||||
p2: pchar { filename }
|
||||
); cdecl; external;
|
||||
|
||||
Procedure XrmMergeDatabases(
|
||||
p1 : TXrmDatabase { source_db };
|
||||
p2 : PXrmDatabase { target_db }
|
||||
); cdecl; external;
|
||||
|
||||
procedure XrmCombineDatabase(
|
||||
p1 : TXrmDatabase { source_db };
|
||||
p2 : PXrmDatabase { target_db };
|
||||
p3 : TBool { override }
|
||||
); cdecl; external;
|
||||
|
||||
{
|
||||
Function XrmEnumerateDatabase(
|
||||
XrmDatabase { db };
|
||||
XrmNameList { name_prefix };
|
||||
XrmClassList { class_prefix };
|
||||
int { mode };
|
||||
Bool (*)(#if NeedNestedPrototypes
|
||||
XrmDatabase* { db };
|
||||
XrmBindingList { bindings };
|
||||
XrmQuarkList { quarks };
|
||||
XrmRepresentation* { type };
|
||||
XrmValue* { value };
|
||||
XPointer { closure }
|
||||
|
||||
) { proc };
|
||||
XPointer { closure }
|
||||
) : TBool; cdecl; external;
|
||||
}
|
||||
|
||||
Function XrmLocaleOfDatabase(
|
||||
P1 : TXrmDatabase { database }
|
||||
) : Pchar; cdecl; external;
|
||||
|
||||
Procedure XrmParseCommand(
|
||||
p1 : TXrmDatabase { database };
|
||||
p2 : TXrmOptionDescList { table };
|
||||
p3 : integer { table_count };
|
||||
p4 : pchar { name };
|
||||
p5 : Pointer { argc_in_out };
|
||||
p6 : ppchar { argv_in_out }
|
||||
); cdecl; external;
|
||||
|
||||
end.
|
893
packages/x11/xutil.pp
Normal file
893
packages/x11/xutil.pp
Normal file
@ -0,0 +1,893 @@
|
||||
Unit XUtil;
|
||||
|
||||
interface
|
||||
|
||||
uses x,xlib;
|
||||
|
||||
{ You must include <X11/Xlib.h> before including this file }
|
||||
|
||||
{
|
||||
* Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
|
||||
* value (x, y, width, height) was found in the parsed string.
|
||||
}
|
||||
Const
|
||||
NoValue =$0000;
|
||||
XValue =$0001;
|
||||
YValue =$0002;
|
||||
WidthValue =$0004;
|
||||
HeightValue =$0008;
|
||||
AllValues =$000F;
|
||||
XNegative =$0010;
|
||||
YNegative =$0020;
|
||||
|
||||
{
|
||||
* new version containing base_width, base_height, and win_gravity fields;
|
||||
* used with WM_NORMAL_HINTS.
|
||||
}
|
||||
Type
|
||||
long = Cardinal; { Untill we know better. M.}
|
||||
|
||||
Type
|
||||
TAspectRecord = record
|
||||
x,y : integer;
|
||||
end;
|
||||
|
||||
TXSizeHints = record
|
||||
flags : Long; { marks which fields in this structure are defined }
|
||||
x, y : Integer ; { obsolete for new window mgrs, but clients }
|
||||
width, height: Integer ; { should set so old wm's don't mess up }
|
||||
min_width, min_height : Integer ;
|
||||
max_width, max_height : Integer ;
|
||||
width_inc, height_inc : Integer ;
|
||||
min_aspect, max_aspect : TAspectRecord;
|
||||
base_width, base_height : Integer ; { added by ICCCM version 1 }
|
||||
win_gravity : Integer ; { added by ICCCM version 1 }
|
||||
end;
|
||||
PXSizeHints=^TXSizeHints;
|
||||
|
||||
{
|
||||
* The next block of definitions are for window manager properties that
|
||||
* clients and applications use for communication.
|
||||
}
|
||||
|
||||
{ flags argument in size hints }
|
||||
Const
|
||||
USPosition = 1 shl 0; { user specified x, y }
|
||||
USSize = 1 shl 1; { user specified width, height }
|
||||
|
||||
PPosition = 1 shl 2; { program specified position }
|
||||
PSize = 1 shl 3; { program specified size }
|
||||
PMinSize = 1 shl 4; { program specified minimum size }
|
||||
PMaxSize = 1 shl 5; { program specified maximum size }
|
||||
PResizeInc = 1 shl 6; { program specified resize increments }
|
||||
PAspect = 1 shl 7; { program specified min and max aspect ratios }
|
||||
PBaseSize = 1 shl 8; { program specified base for incrementing }
|
||||
PWinGravity = 1 shl 9; { program specified window gravity }
|
||||
|
||||
{ obsolete }
|
||||
PAllHints = PPosition or PSize or PMinSize or PMaxSize or PResizeInc or PAspect;
|
||||
|
||||
Type
|
||||
|
||||
TXWMHints = record
|
||||
flags : long; { marks which fields in this structure are defined }
|
||||
input : TBool ; { does this application rely on the window manager to
|
||||
get keyboard input? }
|
||||
initial_state : Integer ; { see below }
|
||||
icon_pixmap : TPixmap ; { pixmap to be used as icon }
|
||||
icon_window : TWindow ; { window to be used as icon }
|
||||
icon_x, icon_y : Integer ; { initial position of icon }
|
||||
icon_mask : TPixmap ; { icon mask bitmap }
|
||||
window_group : TXID ; { id of related window group }
|
||||
{ this structure may be extended in the future }
|
||||
end;
|
||||
{ definition for flags of XWMHints }
|
||||
|
||||
Const
|
||||
InputHint = 1 shl 0;
|
||||
StateHint = 1 shl 1;
|
||||
IconPixmapHint = 1 shl 2;
|
||||
IconWindowHint = 1 shl 3;
|
||||
IconPositionHint = 1 shl 4;
|
||||
IconMaskHint = 1 shl 5;
|
||||
AllHints = InputHint or StateHint or IconPixmapHint or IconWindowHint or
|
||||
IconPositionHint or IconMaskHint {or WindowGroupHint};
|
||||
XUrgencyHint = 1 shl 8;
|
||||
|
||||
{ definitions for initial window state }
|
||||
WithdrawnState = 0; { for windows that are not mapped }
|
||||
NormalState = 1; { most applications want to start this way }
|
||||
IconicState = 3; { application wants to start as an icon }
|
||||
|
||||
{
|
||||
* Obsolete states no longer defined by ICCCM
|
||||
}
|
||||
DontCareState = 0; { don't know or care }
|
||||
ZoomState = 2; { application wants to start zoomed }
|
||||
InactiveState = 4; { application believes it is seldom used; }
|
||||
{ some wm's may put it on inactive menu }
|
||||
|
||||
|
||||
{
|
||||
* new structure for manipulating TEXT properties; used with WM_NAME,
|
||||
* WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
|
||||
}
|
||||
type
|
||||
TXTextProperty = record
|
||||
value : pchar; { same as Property routines }
|
||||
encoding : TAtom; { prop type }
|
||||
format : Integer ; { prop data format: 8, 16, or 32 }
|
||||
nitems : Cardinal; { number of data items in value }
|
||||
end;
|
||||
PXTextProperty = ^TXTextProperty;
|
||||
|
||||
Const
|
||||
|
||||
XNoMemory =-1;
|
||||
XLocaleNotSupported =-2;
|
||||
XConverterNotFound =-3;
|
||||
|
||||
Type
|
||||
TXICCEncodingStyle = Integer;
|
||||
|
||||
Const
|
||||
XStringStyle = 0; { STRING }
|
||||
XCompoundTextStyle = 1; { COMPOUND_TEXT }
|
||||
XTextStyle = 2; { text in owner's encoding (current locale)}
|
||||
XStdICCTextStyle = 3; { STRING, else COMPOUND_TEXT }
|
||||
|
||||
Type
|
||||
TXIconSize = record
|
||||
min_width, min_height,
|
||||
max_width, max_height,
|
||||
width_inc, height_inc : Integer;
|
||||
end;
|
||||
PXIconSize = ^TXIconSize;
|
||||
|
||||
type
|
||||
TXClassHint = record
|
||||
res_name,
|
||||
res_class : pchar;
|
||||
end;
|
||||
PXClassHint = ^TXClassHint;
|
||||
|
||||
{
|
||||
* These macros are used to give some sugar to the image routines so that
|
||||
* naive people are more comfortable with them.
|
||||
}
|
||||
|
||||
{
|
||||
XDestroyImage(ximage) \
|
||||
((*((ximage)->f.destroy_image))((ximage)))
|
||||
XGetPixel(ximage, x, y) \
|
||||
((*((ximage)->f.get_pixel))((ximage), (x), (y)))
|
||||
XPutPixel(ximage, x, y, pixel) \
|
||||
((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
|
||||
XSubImage(ximage, x, y, width, height) \
|
||||
((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
|
||||
XAddPixel(ximage, value) \
|
||||
((*((ximage)->f.add_pixel))((ximage), (value)))
|
||||
}
|
||||
{
|
||||
* Compose sequence status structure, used in calling XLookupString.
|
||||
}
|
||||
|
||||
TXComposeStatus = record
|
||||
compose_ptr : TXPointer ; { state table pointer }
|
||||
chars_matched : Integer ; { match state }
|
||||
end;
|
||||
PTXComposeStatus = ^TXComposeStatus;
|
||||
|
||||
{
|
||||
* Keysym macros, used on Keysyms to test for classes of symbols
|
||||
}
|
||||
{
|
||||
IsKeypadKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
|
||||
|
||||
IsPrivateKeypadKey(keysym) \
|
||||
(((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
|
||||
|
||||
IsCursorKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select))
|
||||
|
||||
IsPFKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4))
|
||||
|
||||
IsFunctionKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35))
|
||||
|
||||
IsMiscFunctionKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
|
||||
|
||||
IsModifierKey(keysym) \
|
||||
((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
|
||||
or or ((KeySym)(keysym) == XK_Mode_switch) \
|
||||
or or ((KeySym)(keysym) == XK_Num_Lock))
|
||||
}
|
||||
{
|
||||
* opaque reference to Region data type
|
||||
}
|
||||
{
|
||||
typedef struct _XRegion *Region;
|
||||
}
|
||||
|
||||
{ Return values from XRectInRegion() }
|
||||
Const
|
||||
RectangleOut =0;
|
||||
RectangleIn =1;
|
||||
RectanglePart=2;
|
||||
|
||||
|
||||
{
|
||||
* Information used by the visual utility routines to find desired visual
|
||||
* type from the many visuals a display may support.
|
||||
}
|
||||
|
||||
Type
|
||||
TXVisualInfo = record
|
||||
visual : PVisual;
|
||||
visualid : TVisualID ;
|
||||
screen : Integer;
|
||||
depth : Integer;
|
||||
c_class : Integer;
|
||||
red_mask : cardinal;
|
||||
green_mask : cardinal;
|
||||
blue_mask : Cardinal;
|
||||
colormap_size : Integer;
|
||||
bits_per_rgb : Integer;
|
||||
end;
|
||||
PXVisualInfo = ^TXVisualInfo;
|
||||
|
||||
Const
|
||||
VisualNoMask = $0;
|
||||
VisualIDMask = $1;
|
||||
VisualScreenMask = $2;
|
||||
VisualDepthMask = $4;
|
||||
VisualClassMask = $8;
|
||||
VisualRedMaskMask = $10;
|
||||
VisualGreenMaskMask = $20;
|
||||
VisualBlueMaskMask = $40;
|
||||
VisualColormapSizeMask = $80;
|
||||
VisualBitsPerRGBMask = $100;
|
||||
VisualAllMask = $1FF;
|
||||
|
||||
{
|
||||
* This defines a window manager property that clients may use to
|
||||
* share standard color maps of type RGB_COLOR_MAP:
|
||||
}
|
||||
Type
|
||||
TXStandardColormap = record
|
||||
colormap : TColormap ;
|
||||
red_max : Cardinal;
|
||||
red_mult : Cardinal;
|
||||
green_max : Cardinal;
|
||||
green_mult : Cardinal;
|
||||
blue_max : Cardinal;
|
||||
blue_mult : Cardinal;
|
||||
base_pixel : Cardinal;
|
||||
visualid : TVisualID; { added by ICCCM version 1 }
|
||||
killid : TXID ; { added by ICCCM version 1 }
|
||||
end;
|
||||
PXStandardColormap= ^TXStandardColormap;
|
||||
|
||||
Const
|
||||
ReleaseByFreeingColormap = 1; { for killid field above }
|
||||
|
||||
|
||||
{
|
||||
* return codes for XReadBitmapFile and XWriteBitmapFile
|
||||
}
|
||||
BitmapSuccess =0;
|
||||
BitmapOpenFailed =1;
|
||||
BitmapFileInvalid =2;
|
||||
BitmapNoMemory =3;
|
||||
|
||||
{***************************************************************
|
||||
*
|
||||
* Context Management
|
||||
*
|
||||
***************************************************************}
|
||||
|
||||
|
||||
{ Associative lookup table return codes }
|
||||
|
||||
XCSUCCESS =0; { No error. }
|
||||
XCNOMEM =1; { Out of memory }
|
||||
XCNOENT =2; { No entry in table }
|
||||
|
||||
type TXContext = Integer;
|
||||
{
|
||||
XUniqueContext() ((XContext) XrmUniqueQuark())
|
||||
XStringToContext(string) ((XContext) XrmStringToQuark(string))
|
||||
}
|
||||
|
||||
Implementation
|
||||
|
||||
end.
|
||||
{
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
{ The following declarations are alphabetized. }
|
||||
|
||||
extern XClassHInteger *XAllocClassHInteger (
|
||||
#if NeedFunctionPrototypes
|
||||
void
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XIconSize *XAllocIconSize (
|
||||
#if NeedFunctionPrototypes
|
||||
void
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSizeHints *XAllocSizeHints (
|
||||
#if NeedFunctionPrototypes
|
||||
void
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XStandardColormap *XAllocStandardColormap (
|
||||
#if NeedFunctionPrototypes
|
||||
void
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XWMHints *XAllocWMHints (
|
||||
#if NeedFunctionPrototypes
|
||||
void
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XClipBox(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { r },
|
||||
XRectangle* { rect_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Region XCreateRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
void
|
||||
#endif
|
||||
);
|
||||
|
||||
extern char *XDefaultString(
|
||||
#if NeedFunctionPrototypes
|
||||
void
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XDeleteContext(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
XID { rid },
|
||||
XContext { context }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XDestroyRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { r }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XEmptyRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { r }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XEqualRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { r1 },
|
||||
Region { r2 }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XFindContext(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
XID { rid },
|
||||
XContext { context },
|
||||
XPointer* { data_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetClassHint(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XClassHint* { class_hints_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetIconSizes(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XIconSize** { size_list_return },
|
||||
int* { count_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetNormalHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { hints_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetRGBColormaps(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XStandardColormap** { stdcmap_return },
|
||||
int* { count_return },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetSizeHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { hints_return },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetStandardColormap(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XStandardColormap* { colormap_return },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetTextProperty(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { window },
|
||||
XTextProperty* { text_prop_return },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XVisualInfo *XGetVisualInfo(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
long { vinfo_mask },
|
||||
XVisualInfo* { vinfo_template },
|
||||
int* { nitems_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetWMClientMachine(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XTextProperty* { text_prop_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XWMHints *XGetWMHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetWMIconName(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XTextProperty* { text_prop_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetWMName(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XTextProperty* { text_prop_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetWMNormalHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { hints_return },
|
||||
long* { supplied_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetWMSizeHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { hints_return },
|
||||
long* { supplied_return },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XGetZoomHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { zhints_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XIntersectRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { sra },
|
||||
Region { srb },
|
||||
Region { dr_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XConvertCase(
|
||||
#if NeedFunctionPrototypes
|
||||
KeySym { sym },
|
||||
KeySym* { lower },
|
||||
KeySym* { upper }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XLookupString(
|
||||
#if NeedFunctionPrototypes
|
||||
XKeyEvent* { event_struct },
|
||||
char* { buffer_return },
|
||||
int { bytes_buffer },
|
||||
KeySym* { keysym_return },
|
||||
XComposeStatus* { status_in_out }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XMatchVisualInfo(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
int { screen },
|
||||
int { depth },
|
||||
int { class },
|
||||
XVisualInfo* { vinfo_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XOffsetRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { r },
|
||||
int { dx },
|
||||
int { dy }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Bool XPointInRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { r },
|
||||
int { x },
|
||||
int { y }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Region XPolygonRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
XPoint* { points },
|
||||
int { n },
|
||||
int { fill_rule }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XRectInRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { r },
|
||||
int { x },
|
||||
int { y },
|
||||
unsigned int { width },
|
||||
unsigned int { height }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XSaveContext(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
XID { rid },
|
||||
XContext { context },
|
||||
_Xconst char* { data }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSetClassHint(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XClassHint* { class_hints }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSetIconSizes(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XIconSize* { size_list },
|
||||
int { count }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSetNormalHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { hints }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetRGBColormaps(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XStandardColormap* { stdcmaps },
|
||||
int { count },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSetSizeHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { hints },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSetStandardProperties(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
_Xconst char* { window_name },
|
||||
_Xconst char* { icon_name },
|
||||
Pixmap { icon_pixmap },
|
||||
char** { argv },
|
||||
int { argc },
|
||||
XSizeHints* { hints }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetTextProperty(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XTextProperty* { text_prop },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetWMClientMachine(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XTextProperty* { text_prop }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSetWMHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XWMHints* { wm_hints }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetWMIconName(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XTextProperty* { text_prop }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetWMName(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XTextProperty* { text_prop }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetWMNormalHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { hints }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetWMProperties(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XTextProperty* { window_name },
|
||||
XTextProperty* { icon_name },
|
||||
char** { argv },
|
||||
int { argc },
|
||||
XSizeHints* { normal_hints },
|
||||
XWMHints* { wm_hints },
|
||||
XClassHint* { class_hints }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XmbSetWMProperties(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
_Xconst char* { window_name },
|
||||
_Xconst char* { icon_name },
|
||||
char** { argv },
|
||||
int { argc },
|
||||
XSizeHints* { normal_hints },
|
||||
XWMHints* { wm_hints },
|
||||
XClassHint* { class_hints }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetWMSizeHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { hints },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSetRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
GC { gc },
|
||||
Region { r }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XSetStandardColormap(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XStandardColormap* { colormap },
|
||||
Atom { property }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSetZoomHints(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
Window { w },
|
||||
XSizeHints* { zhints }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XShrinkRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { r },
|
||||
int { dx },
|
||||
int { dy }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XStringListToTextProperty(
|
||||
#if NeedFunctionPrototypes
|
||||
char** { list },
|
||||
int { count },
|
||||
XTextProperty* { text_prop_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XSubtractRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { sra },
|
||||
Region { srb },
|
||||
Region { dr_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XmbTextListToTextProperty(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
char** { list },
|
||||
int { count },
|
||||
XICCEncodingStyle { style },
|
||||
XTextProperty* { text_prop_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XwcTextListToTextProperty(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
wchar_t** { list },
|
||||
int { count },
|
||||
XICCEncodingStyle { style },
|
||||
XTextProperty* { text_prop_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void XwcFreeStringList(
|
||||
#if NeedFunctionPrototypes
|
||||
wchar_t** { list }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Status XTextPropertyToStringList(
|
||||
#if NeedFunctionPrototypes
|
||||
XTextProperty* { text_prop },
|
||||
char*** { list_return },
|
||||
int* { count_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XmbTextPropertyToTextList(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
XTextProperty* { text_prop },
|
||||
char*** { list_return },
|
||||
int* { count_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XwcTextPropertyToTextList(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
XTextProperty* { text_prop },
|
||||
wchar_t*** { list_return },
|
||||
int* { count_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XUnionRectWithRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
XRectangle* { rectangle },
|
||||
Region { src_region },
|
||||
Region { dest_region_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XUnionRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { sra },
|
||||
Region { srb },
|
||||
Region { dr_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern Integer XWMGeometry(
|
||||
#if NeedFunctionPrototypes
|
||||
Display* { display },
|
||||
int { screen_number },
|
||||
_Xconst char* { user_geometry },
|
||||
_Xconst char* { default_geometry },
|
||||
unsigned int { border_width },
|
||||
XSizeHints* { hints },
|
||||
int* { x_return },
|
||||
int* { y_return },
|
||||
int* { width_return },
|
||||
int* { height_return },
|
||||
int* { gravity_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
extern XXorRegion(
|
||||
#if NeedFunctionPrototypes
|
||||
Region { sra },
|
||||
Region { srb },
|
||||
Region { dr_return }
|
||||
#endif
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif { _XUTIL_H_ }
|
||||
}
|
Loading…
Reference in New Issue
Block a user