mirror of
https://github.com/ptitSeb/box86.git
synced 2026-11-09 17:43:18 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27e5262f1d | ||
|
|
363464092e | ||
|
|
b2cab70427 | ||
|
|
44d5301244 | ||
|
|
8e4f4feb3c | ||
|
|
e9f6f8824c | ||
|
|
be6f9870d0 | ||
|
|
bb086223c7 | ||
|
|
be6a3bff3f | ||
|
|
adfc5fda2e | ||
|
|
d833f136a0 | ||
|
|
1703e9d1b7 | ||
|
|
011b9f93e4 | ||
|
|
e449a4e247 | ||
|
|
fe7f0ff842 | ||
|
|
2033e5764d | ||
|
|
55175263ac | ||
|
|
c484221cd6 | ||
|
|
e9862cb30d | ||
|
|
0c7b99cbc6 | ||
|
|
824f39e4db | ||
|
|
66a5ce1e52 | ||
|
|
f39637a652 | ||
|
|
eaf7d0a277 | ||
|
|
b61bb908a2 | ||
|
|
2e891b807c | ||
|
|
f0b236df88 | ||
|
|
08904dbe0d | ||
|
|
c9c4e226af | ||
|
|
ab3dc70145 | ||
|
|
4d8c841f3f | ||
|
|
a8b247cde9 | ||
|
|
416e161285 | ||
|
|
cc8d1f9bf2 | ||
|
|
ae95f1b0e5 | ||
|
|
c10441bec4 | ||
|
|
6ab334fc34 | ||
|
|
10e849ce60 | ||
|
|
c2206f5452 | ||
|
|
3b66cd3cee | ||
|
|
731a083bb7 | ||
|
|
d35c6ab864 | ||
|
|
e9cade872c | ||
|
|
b2a8146851 | ||
|
|
6fd3d6c452 | ||
|
|
bc3e72a87d | ||
|
|
e50e050aa9 | ||
|
|
c1a75607fa | ||
|
|
b203cd2af3 | ||
|
|
84063f026f | ||
|
|
3ec1ce25d7 | ||
|
|
0e70c543ee | ||
|
|
e4d522a8d2 | ||
|
|
272ecbd8ff | ||
|
|
369fa03f9b | ||
|
|
1675ea3ba2 | ||
|
|
5b7a1bb9e6 | ||
|
|
ace3effa2d | ||
|
|
bd0a14b3ce | ||
|
|
29a82f83c5 | ||
|
|
f7232f09de | ||
|
|
f3eeae9edd | ||
|
|
874468ca07 | ||
|
|
7a972af610 | ||
|
|
4ed42c38c9 | ||
|
|
6a73719a6b | ||
|
|
6efcfc6b93 | ||
|
|
25f30c220e | ||
|
|
2e9665f10e | ||
|
|
197881b430 | ||
|
|
96fe98d71f | ||
|
|
d1ecd4c933 | ||
|
|
fad25caa08 | ||
|
|
98c481e045 | ||
|
|
6082e655e6 | ||
|
|
6a97367242 | ||
|
|
bbcfffdab9 | ||
|
|
2dfb6c1012 | ||
|
|
82317343aa | ||
|
|
0ea0d0ec98 | ||
|
|
33aa27c590 | ||
|
|
c31f990183 | ||
|
|
791956bee0 | ||
|
|
6cebf4f6fd | ||
|
|
1782136e02 | ||
|
|
2f381192dd | ||
|
|
dac2009cab | ||
|
|
d592af694f | ||
|
|
e5ea3f9e49 | ||
|
|
f0af865401 | ||
|
|
1e20a9effe | ||
|
|
ce968f7756 | ||
|
|
00aaf316ef | ||
|
|
3ad9a0ca73 | ||
|
|
14a2d24fba | ||
|
|
e374886fcf | ||
|
|
e25b373f00 | ||
|
|
6fbd270d24 | ||
|
|
6adb55a9c4 | ||
|
|
16aa5cac04 | ||
|
|
dca0009df5 | ||
|
|
1cae441cbc | ||
|
|
8b21d8f74a | ||
|
|
ff141e30ee | ||
|
|
2c970a1b8d | ||
|
|
b433f8194e | ||
|
|
7b2f5e5de0 | ||
|
|
3d1400e347 | ||
|
|
8b5d68f79b | ||
|
|
ded4b461b4 | ||
|
|
13a7be57f2 | ||
|
|
e8fdcd5c06 | ||
|
|
b8e263d7e6 | ||
|
|
b76d17e7b9 | ||
|
|
ce3151b256 | ||
|
|
dd0c3ac51e | ||
|
|
f06c5897db | ||
|
|
7dac72f796 | ||
|
|
e5a55114b7 | ||
|
|
a66d0b3d39 | ||
|
|
b01ad69ba1 | ||
|
|
bbe183e8d4 | ||
|
|
f6c9e5079a | ||
|
|
0b8408d50a | ||
|
|
51682eac11 | ||
|
|
aea38c682c | ||
|
|
6edbe97290 | ||
|
|
304eaab4d2 | ||
|
|
f4e5839931 | ||
|
|
4bac9ea9d5 | ||
|
|
64c9b21849 | ||
|
|
34828b66a2 | ||
|
|
957ba00723 | ||
|
|
d548ee48c1 | ||
|
|
d0e93a22a2 | ||
|
|
fe6c1e260b | ||
|
|
1e5add91d3 | ||
|
|
f4c7329c30 | ||
|
|
b1742ccb8e | ||
|
|
870a0d8361 | ||
|
|
1f0adf92d4 | ||
|
|
18ce562698 | ||
|
|
77af926336 | ||
|
|
33f2269896 | ||
|
|
c477e14a04 | ||
|
|
373494094a | ||
|
|
72ca666007 | ||
|
|
5be299b897 | ||
|
|
49afd5077b | ||
|
|
e7336de8a7 | ||
|
|
5b0f4f5b94 |
No files matched your search
@@ -1,3 +1,17 @@
|
||||
v0.1.6
|
||||
======
|
||||
* Changes in Dynarec to make flags optimizations before CALL and RET opcode less aggressive
|
||||
* Added Vulkan wrapper
|
||||
* Improved wrapping of SDL_mixer/ SDL2_mixer lib
|
||||
* Improved wrapping of some gtk structures
|
||||
* Added a quick and dirty wrapping of Gtk3 (based on current gtk2)
|
||||
* Improved the signal handling, should be more stable now (the signal handler from syscall still need some works)
|
||||
* Added RK3399 profile, and some hints to build the 32bits box86 on 64bits OS
|
||||
* Fixed some wrapped printf formating not handled correctly
|
||||
* Fixed some buserror with the new LOCK mecanism handling
|
||||
* A few more Dynarec opcodes added
|
||||
* If winedbg is tried to be launched, exit without launching it (it doesn't work anyway)
|
||||
|
||||
v0.1.4
|
||||
======
|
||||
* Change in Dynarec memory handling, to simplify it (and hopefully optimized it)
|
||||
|
||||
+37
-39
@@ -1,25 +1,26 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
project(box86)
|
||||
|
||||
enable_testing()
|
||||
enable_language(C)
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
option(PANDORA "Set to ON if targeting an OpenPandora device" ${PANDORA})
|
||||
option(PYRA "Set to ON if targeting an OpenPandora device" ${PYRA})
|
||||
option(RPI2 "Set to ON if targeting an RaspberryPI2 device" ${RPI2})
|
||||
option(RPI3 "Set to ON if targeting an RaspberryPI3 device" ${RPI3})
|
||||
option(RPI4 "Set to ON if targeting an RaspberryPI4 device" ${RPI4})
|
||||
option(RK3399 "Set to ON if targeting an Rockchip RK3399 based device" ${RK3399})
|
||||
option(GAMESHELL "Set to ON if targeting a GameShell device" ${GAMESHELL})
|
||||
option(ODROID "Set to ON if targeting an ODroid device" ${ODROID})
|
||||
option(USE_CCACHE "Set to ON to use ccache if present in the system" ${USE_CCACHE})
|
||||
option(LD80BITS "Set to ON if host device have 80bits long double (i.e. i386)" ${LD80BITS})
|
||||
option(NOALIGN "Set to ON if host device doesn't need re-align (i.e. i386)" ${NOALIGN})
|
||||
option(HAVE_TRACE "Set to ON to have Trace ability (needs ZydisInfo library)" ${HAVE_TRACE})
|
||||
option(NOLOADADDR "Set to ON to avoid fixing the load address of Box86" ${NO_LOADAADR})
|
||||
option(ARM_DYNAREC "Set to ON to use ARM Dynamic Recompilation (WIP, don't use yet)" ${ARM_DYNAREC})
|
||||
option(NOGETCLOCK "Set to ON to avoid using clock_gettime with CLOCK_MONOTONIC_COARSE for RDTSC opcode (use gltimeofday instead)" ${NOGETCLOCK})
|
||||
option(NOGIT "Set to ON if not building from a git clone repo (like when building from a zip download from github)" ${NOGIT})
|
||||
if(PANDORA OR PYRA OR RPI2 OR RPI3 OR RPI4 OR GAMESHELL OR ODROID OR RK3399)
|
||||
set(LD80BITS OFF CACHE BOOL "")
|
||||
set(NOALIGN OFF CACHE BOOL "")
|
||||
set(ARM_DYNAREC ON CACHE BOOL "")
|
||||
endif()
|
||||
option(LD80BITS "Set to ON if host device have 80bits long double (i.e. i386)" ${LD80BITS})
|
||||
option(NOALIGN "Set to ON if host device doesn't need re-align (i.e. i386)" ${NOALIGN})
|
||||
option(ARM_DYNAREC "Set to ON to use ARM Dynamic Recompilation (WIP, don't use yet)" ${ARM_DYNAREC})
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.12.2")
|
||||
find_package(PythonInterp 3)
|
||||
@@ -37,6 +38,16 @@ else()
|
||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE INTERNAL "The Python3 executable" FORCE)
|
||||
endif()
|
||||
|
||||
if(RK3399)
|
||||
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
|
||||
#set(CMAKE_ASM_COMPILER arm-linux-gnueabihf-as) #will use gcc in fact
|
||||
set(CMAKE_C_COMPILER_TARGET arm-linux-gnueabihf)
|
||||
endif()
|
||||
|
||||
project(box86 C ASM)
|
||||
|
||||
enable_testing()
|
||||
|
||||
set(default_build_type "RelwithDebInfo")
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
|
||||
@@ -44,66 +55,47 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
|
||||
# Pandora
|
||||
if(PANDORA)
|
||||
add_definitions(-DPANDORA)
|
||||
#add_definitions(-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -fsingle-precision-constant -ffast-math)
|
||||
set(ARM_DYNAREC ON)
|
||||
set(LD80BITS OFF)
|
||||
set(NOALIGN OFF)
|
||||
endif()
|
||||
|
||||
# Gameshell
|
||||
if(GAMESHELL)
|
||||
add_definitions(-DGAMEHELL)
|
||||
add_definitions(-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard)
|
||||
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard")
|
||||
set(ARM_DYNAREC ON)
|
||||
set(LD80BITS OFF)
|
||||
set(NOALIGN OFF)
|
||||
endif()
|
||||
|
||||
if(PYRA)
|
||||
add_definitions(-DPYRA)
|
||||
add_definitions(-mcpu=cortex-a15 -mfpu=neon -mfloat-abi=hard -marm)
|
||||
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a15 -mfpu=neon -mfloat-abi=hard")
|
||||
set(ARM_DYNAREC ON)
|
||||
set(LD80BITS OFF)
|
||||
set(NOALIGN OFF)
|
||||
endif()
|
||||
|
||||
if(RPI2)
|
||||
add_definitions(-DRPI)
|
||||
add_definitions(-DRPI2)
|
||||
add_definitions(-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard)
|
||||
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard")
|
||||
set(ARM_DYNAREC ON)
|
||||
set(LD80BITS OFF)
|
||||
set(NOALIGN OFF)
|
||||
endif()
|
||||
if(RPI3)
|
||||
add_definitions(-DRPI)
|
||||
add_definitions(-DRPI3)
|
||||
add_definitions(-marm -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
||||
set(CMAKE_ASM_FLAGS "-marm -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
||||
set(ARM_DYNAREC ON)
|
||||
set(LD80BITS OFF)
|
||||
set(NOALIGN OFF)
|
||||
endif()
|
||||
if(RPI4)
|
||||
add_definitions(-DRPI)
|
||||
add_definitions(-DRPI3)
|
||||
add_definitions(-DRPI4)
|
||||
add_definitions(-marm -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
||||
set(CMAKE_ASM_FLAGS "-marm -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
||||
set(ARM_DYNAREC ON)
|
||||
set(LD80BITS OFF)
|
||||
set(NOALIGN OFF)
|
||||
endif()
|
||||
if(ODROID)
|
||||
add_definitions(-DODROID)
|
||||
add_definitions(-mcpu=cortex-a9 -mfpu=neon-vfpv4 -mfloat-abi=hard -marm)
|
||||
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a9 -mfpu=neon-vfpv4 -mfloat-abi=hard")
|
||||
set(ARM_DYNAREC ON)
|
||||
set(LD80BITS OFF)
|
||||
set(NOALIGN OFF)
|
||||
endif()
|
||||
if(RK3399)
|
||||
add_definitions(-DRK3399)
|
||||
add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72+crypto)
|
||||
set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72+crypto")
|
||||
endif()
|
||||
|
||||
if(NOGIT)
|
||||
@@ -158,7 +150,7 @@ else()
|
||||
endif()
|
||||
|
||||
|
||||
add_definitions(-std=gnu99 -funwind-tables -fvisibility=hidden)
|
||||
add_definitions(-std=gnu11 -funwind-tables -fvisibility=hidden)
|
||||
|
||||
if(USE_CCACHE)
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
@@ -218,6 +210,7 @@ set(ELFLOADER_SRC
|
||||
"${BOX86_ROOT}/src/libtools/sdl2rwops.c"
|
||||
"${BOX86_ROOT}/src/libtools/signals.c"
|
||||
"${BOX86_ROOT}/src/libtools/threads.c"
|
||||
"${BOX86_ROOT}/src/libtools/vkalign.c"
|
||||
"${BOX86_ROOT}/src/dynarec/dynarec.c"
|
||||
"${BOX86_ROOT}/src/wrapped/generated/wrapper.c"
|
||||
)
|
||||
@@ -308,6 +301,8 @@ set(WRAPPEDS
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedlibtinfo6.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedgtkx112.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedgdkx112.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedgtk3.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedgdk3.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedgdkpixbuf2.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedgio2.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedgmodule2.c"
|
||||
@@ -332,6 +327,8 @@ set(WRAPPEDS
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedgnutls.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedlibcups.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedd3dadapter9.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedvulkan.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedwaylandclient.c"
|
||||
"${BOX86_ROOT}/src/wrapped/wrappedldlinux.c"
|
||||
)
|
||||
|
||||
@@ -497,7 +494,8 @@ string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "x86_64" _x86_64)
|
||||
if(NOT _x86 AND NOT _x86_64)
|
||||
install(TARGETS ${BOX86}
|
||||
RUNTIME DESTINATION bin)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/system/box86.conf DESTINATION /etc/binfmt.d/)
|
||||
configure_file(system/box86.conf.cmake system/box86.conf)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/system/box86.conf DESTINATION /etc/binfmt.d/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.6 DESTINATION /usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.5 DESTINATION /usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libgcc_s.so.1 DESTINATION /usr/lib/i386-linux-gnu/)
|
||||
|
||||
+7
-1
@@ -20,7 +20,7 @@ Compiling
|
||||
git clone https://github.com/ptitSeb/box86
|
||||
cd box86
|
||||
mkdir build; cd build; cmake .. -DRPI4=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
make -j24
|
||||
make -j4
|
||||
sudo make install
|
||||
sudo systemctl restart systemd-binfmt
|
||||
```
|
||||
@@ -31,6 +31,12 @@ sudo systemctl restart systemd-binfmt
|
||||
|
||||
`mkdir build; cd build; cmake .. -DODROID=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo; make`
|
||||
|
||||
#### for RK3399
|
||||
|
||||
`mkdir build; cd build; cmake .. -DRK3399=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo; make -j4`
|
||||
|
||||
As most RK3399 device run AARCH64 OS, you'll need an `armhf` multiarch env, and an armhf gcc: use `sudo apt install gcc-arm-linux-gnueabihf` to install it.
|
||||
|
||||
#### for Other ARM Linux
|
||||
|
||||
`mkdir build; cd build; cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo; make`
|
||||
|
||||
@@ -5,7 +5,7 @@ Linux Userspace x86 Emulator with a twist
|
||||
|
||||
Box86 lets you run x86 Linux programs (such as games) on non-x86 Linux, like ARM (host system needs to be 32bit little-endian).
|
||||
|
||||
You *NEED* a 32-bit subsystem to run and build Box86. Box86 is useless on 64-bit only systems. Also, you *NEED* a 32-bit toolchain to build Box86. A toolchain that only support 64-bit will not compile Box86, and you'll get errors (typically on aarch64, you get "-marm" not recognized).
|
||||
You *NEED* a 32-bit subsystem to run and build Box86. Box86 is useless on 64-bit only systems. Also, you *NEED* a 32-bit toolchain to build Box86. A toolchain that only support 64-bit will not compile Box86, and you'll get errors (typically on aarch64, you get "-marm" not recognized, and you'll need a multiarch or chroot environnement).
|
||||
|
||||
Because Box86 uses the native versions of some "system" libraries, like libc, libm, SDL, and OpenGL, it's easy to integrate and use, and performance can be surprisingly high in some cases.
|
||||
|
||||
@@ -91,7 +91,7 @@ A note about Steam
|
||||
----
|
||||
|
||||
Linux Steam can run now with box86. But it's still a bit unstable., and not everything works. First is steam crashes after the Sign in, you may need to add libappindicator. On debian it's `sudo apt install libappindicator1`.
|
||||
Once open, Steam will only work on "Small mode". So go in the "View" menu and witch to Small view (or Compact view?), else the list will stay empty (this is because some steam component used in the browser view are only 64bits now).
|
||||
Once open, Steam will only work on "Small mode" and in "Big Picture", not in the regular "Browser mode". So go in the "View" menu and witch to Small view (or Compact view?), else the list will stay empty (this is because some steam component used in the browser view are only 64bits now).
|
||||
Final word, to avoid the "libc.so.6 is absent" message, you can use `STEAMOS=1` and `STEAM_RUNTIME=1` export.
|
||||
(Steam for Windows install fine but doesn't work yet)
|
||||
|
||||
@@ -101,6 +101,7 @@ A note about Wine
|
||||
----
|
||||
|
||||
Wine is now partly supported. Wine integreted program all runs, annd some windows program and games now run fine. Don't forget most Windows games use Direct3D, that may require a complete OpenGL driver and as high profile as possible (and gl4es with ES2 backend have issue with Wine for now). Also, vulkan is not wrapped on box86, so vk3d is not usable yet, even if supported by the hardware.
|
||||
A not if you plan to use box86 with wine on Raspberry PI 3 or earlier: those model use a default OS that have a kernle with a 2/2 Split (meaning 2G of space for user program, and 2G of space for Kernel). This is not compatible with wine, that need to access memory > 2Gb address. So you'll need to reconfigure your kernel for a 3G/1G split. Use your favorite search engine to find tutos on how to do that.
|
||||
|
||||
----
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Maintainer: SpacingBat3 <[email protected]>
|
||||
# Contributor: Sebastien Chevalier
|
||||
pkgname=box86-arm-git
|
||||
pkgver=r2798.0edc0374
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices."
|
||||
arch=('armv7h')
|
||||
url="https://github.com/ptitSeb/box86"
|
||||
license=('MIT')
|
||||
optdepends=('gl4es: OpenGL 2 for GLES 2 devices')
|
||||
makedepends=('git' 'cmake' 'make')
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
source=('git+https://github.com/ptitSeb/box86')
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname%-git}"
|
||||
if [[ ! -d ./build ]]; then
|
||||
mkdir build && cd build
|
||||
cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make -j$(nproc)
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
# Maintainer: SpacingBat3 <[email protected]>
|
||||
# Contributor: Sebastien Chevalier
|
||||
pkgname=box86-gameshell-git
|
||||
pkgver=r2798.0edc0374
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices."
|
||||
arch=('armv7h')
|
||||
url="https://github.com/ptitSeb/box86"
|
||||
license=('MIT')
|
||||
optdepends=('gl4es: OpenGL 2 for GLES 2 devices')
|
||||
makedepends=('git' 'cmake' 'make')
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
source=('git+https://github.com/ptitSeb/box86')
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname%-git}"
|
||||
if [[ ! -d ./build ]]; then
|
||||
mkdir build && cd build
|
||||
cmake .. -DGAMESHELL=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make -j$(nproc)
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
# Maintainer: SpacingBat3 <[email protected]>
|
||||
# Contributor: Sebastien Chevalier
|
||||
pkgname=box86-odroid-git
|
||||
pkgver=r2798.0edc0374
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices."
|
||||
arch=('armv7h')
|
||||
url="https://github.com/ptitSeb/box86"
|
||||
license=('MIT')
|
||||
optdepends=('gl4es: OpenGL 2 for GLES 2 devices')
|
||||
makedepends=('git' 'cmake' 'make')
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
source=('git+https://github.com/ptitSeb/box86')
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname%-git}"
|
||||
if [[ ! -d ./build ]]; then
|
||||
mkdir build && cd build
|
||||
cmake .. -DODROID=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make -j$(nproc)
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
# Maintainer: SpacingBat3 <[email protected]>
|
||||
# Contributor: Sebastien Chevalier
|
||||
pkgname=box86-pandora-git
|
||||
pkgver=r2798.0edc0374
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices."
|
||||
arch=('armv7h')
|
||||
url="https://github.com/ptitSeb/box86"
|
||||
license=('MIT')
|
||||
optdepends=('gl4es: OpenGL 2 for GLES 2 devices')
|
||||
makedepends=('git' 'cmake' 'make')
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
source=('git+https://github.com/ptitSeb/box86')
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname%-git}"
|
||||
if [[ ! -d ./build ]]; then
|
||||
mkdir build && cd build
|
||||
cmake .. -DPANDORA=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make -j$(nproc)
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
# Maintainer: SpacingBat3 <[email protected]>
|
||||
# Contributor: Sebastien Chevalier
|
||||
pkgname=box86-pyra-git
|
||||
pkgver=r2798.0edc0374
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices."
|
||||
arch=('armv7h')
|
||||
url="https://github.com/ptitSeb/box86"
|
||||
license=('MIT')
|
||||
optdepends=('gl4es: OpenGL 2 for GLES 2 devices')
|
||||
makedepends=('git' 'cmake' 'make')
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
source=('git+https://github.com/ptitSeb/box86')
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname%-git}"
|
||||
if [[ ! -d ./build ]]; then
|
||||
mkdir build && cd build
|
||||
cmake .. -DPYRA=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make -j$(nproc)
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
# Maintainer: SpacingBat3 <[email protected]>
|
||||
# Contributor: Sebastien Chevalier
|
||||
pkgname=box86-rpi-git
|
||||
pkgver=r2798.0edc0374
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices."
|
||||
arch=('armv7h')
|
||||
url="https://github.com/ptitSeb/box86"
|
||||
license=('MIT')
|
||||
optdepends=('gl4es: OpenGL 2 for GLES 2 devices')
|
||||
makedepends=('git' 'cmake' 'make')
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
source=('git+https://github.com/ptitSeb/box86')
|
||||
md5sums=('SKIP')
|
||||
_pimodel=`tr -d '\0' < /sys/firmware/devicetree/base/model`
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname%-git}"
|
||||
# Check for Pi version number
|
||||
if [[ ${_pimodel} ~= "Raspberry Pi 4" ]]; then
|
||||
_piversion=4
|
||||
elif [[ ${_pimodel} ~= "Raspberry Pi 3" ]]; then
|
||||
_piversion=3
|
||||
elif [[ ${_pimodel} ~= "Raspberry Pi 2" ]]; then
|
||||
_piversion=2
|
||||
else
|
||||
# Your RPI is not supported or this device is not a pi, cancel build then
|
||||
echo -e "\033[01m\033[01;31m==> ERROR:\033[00;01m Your device is not supported! This script is for RPi model 4/3/2 (1/0 not supported).\033[00m"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "\033[01m\033[01;34m==> INFO:\033[00;01m Your detected Pi verion number is: \033[01;31m${_piversion}\033[01m.\033[00m"
|
||||
if [[ ! -d ./build ]]; then
|
||||
mkdir build && cd build
|
||||
cmake .. -DRPI${_piversion}=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make -j$(nproc)
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
# Maintainer: SpacingBat3 <[email protected]>
|
||||
# Contributor: Sebastien Chevalier
|
||||
pkgname=box86-x86-git
|
||||
pkgver=r2798.0edc0374
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices."
|
||||
arch=('i386')
|
||||
url="https://github.com/ptitSeb/box86"
|
||||
license=('MIT')
|
||||
makedepends=('git' 'cmake' 'make')
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
source=('git+https://github.com/ptitSeb/box86')
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname%-git}"
|
||||
if [[ ! -d ./build ]]; then
|
||||
mkdir build && cd build
|
||||
cmake .. -DLD80BITS=1 -DNOALIGN=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make -j$(nproc)
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}/build"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# The directory containing all PKGBUILDs for BOX86
|
||||
## FAQ
|
||||
### 1. How to use it?
|
||||
Just download the `PKGBUILD-<your-platform>` (no need to download the whole repository), go to directory where you downloaded and type:
|
||||
```sh
|
||||
mv ./PKGBUILD-<your-platform> ./PKGBUILD
|
||||
cd ..
|
||||
makepkg -si
|
||||
```
|
||||
This will copy the PKGBUILD for your platform (where you type your platform name instead of `<your-platform>`), build it and install the PKGBUILD on 32-bit Archlinux ARM.
|
||||
|
||||
In the future, I might try to do an unified PKGBUILD for all platforms that will recognize your platform automatically.
|
||||
|
||||
### 2. What platforms are currently supported.
|
||||
All specified in [COMPILE.md](../COMPILE.md).
|
||||
|
||||
### 3. Any advantages with that sollution?
|
||||
This might give you some advantages like those:
|
||||
- automatic updates (with some AUR frontends like [`pamac-aur`](https://aur.archlinux.org/packages/pamac-aur/) or [`yay`](https://aur.archlinux.org/packages/yay));
|
||||
- easily uninstall with `pacman -R` when no needed (no need other scripts nor Makefile to do this);
|
||||
- your `box86` installation is recognized as a package (where it wasn't when installing with `make install`).
|
||||
+120
-62
@@ -3,7 +3,7 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
values = ['E', 'e', 'v', 'c', 'w', 'i', 'I', 'C', 'W', 'u', 'U', 'f', 'd', 'D', 'K', 'l', 'L', 'p', 'V', 'O', 'S', '2']
|
||||
values = ['E', 'e', 'v', 'c', 'w', 'i', 'I', 'C', 'W', 'u', 'U', 'f', 'd', 'D', 'K', 'l', 'L', 'p', 'V', 'O', 'S', '2', 'P', 'G']
|
||||
def splitchar(s):
|
||||
try:
|
||||
ret = [len(s), values.index(s[0])]
|
||||
@@ -252,6 +252,33 @@ static void* io_convert(void* v)
|
||||
return v;
|
||||
}
|
||||
|
||||
typedef struct my_GValue_s
|
||||
{
|
||||
int g_type;
|
||||
union {
|
||||
int v_int;
|
||||
int64_t v_int64;
|
||||
uint64_t v_uint64;
|
||||
float v_float;
|
||||
double v_double;
|
||||
void* v_pointer;
|
||||
} data[2];
|
||||
} my_GValue_t;
|
||||
|
||||
static void alignGValue(my_GValue_t* v, void* value)
|
||||
{
|
||||
v->g_type = *(int*)value;
|
||||
memcpy(v->data, value+4, 2*sizeof(double));
|
||||
}
|
||||
static void unalignGValue(void* value, my_GValue_t* v)
|
||||
{
|
||||
*(int*)value = v->g_type;
|
||||
memcpy(value+4, v->data, 2*sizeof(double));
|
||||
}
|
||||
|
||||
void* VulkanFromx86(void* src, void** save);
|
||||
void VulkanTox86(void* src, void* save);
|
||||
|
||||
#define ST0val ST0.d
|
||||
|
||||
int of_convert(int);
|
||||
@@ -262,6 +289,7 @@ int of_convert(int);
|
||||
#ifndef __WRAPPER_H_
|
||||
#define __WRAPPER_H_
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct x86emu_s x86emu_t;
|
||||
|
||||
@@ -282,6 +310,8 @@ typedef void (*wrapper_t)(x86emu_t* emu, uintptr_t fnc);
|
||||
// S = _IO_2_1_stdXXX_ pointer (or FILE*)
|
||||
// Q = ...
|
||||
// 2 = struct of 2 uint
|
||||
// P = Vulkan struture pointer
|
||||
// G = a single GValue pointer
|
||||
|
||||
"""
|
||||
}
|
||||
@@ -317,8 +347,8 @@ typedef void (*wrapper_t)(x86emu_t* emu, uintptr_t fnc);
|
||||
|
||||
# First part: typedefs
|
||||
for v in gbl["()"]:
|
||||
# E e v c w i I C W u U f d D K l L p V O S 2
|
||||
types = ["x86emu_t*", "x86emu_t**", "void", "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", "float", "double", "long double", "double", "intptr_t", "uintptr_t", "void*", "void*", "int32_t", "void*", "_2uint_struct_t"]
|
||||
# E e v c w i I C W u U f d D K l L p V O S 2 P G
|
||||
types = ["x86emu_t*", "x86emu_t**", "void", "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", "float", "double", "long double", "double", "intptr_t", "uintptr_t", "void*", "void*", "int32_t", "void*", "_2uint_struct_t", "void*", "void*"]
|
||||
if len(values) != len(types):
|
||||
raise NotImplementedError("len(values) = {lenval} != len(types) = {lentypes}".format(lenval=len(values), lentypes=len(types)))
|
||||
|
||||
@@ -327,8 +357,8 @@ typedef void (*wrapper_t)(x86emu_t* emu, uintptr_t fnc);
|
||||
for k in gbl_idxs:
|
||||
file.write("\n#if " + k + "\n")
|
||||
for v in gbl[k]:
|
||||
# E e v c w i I C W u U f d D K l L p V O S 2
|
||||
types = ["x86emu_t*", "x86emu_t**", "void", "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", "float", "double", "long double", "double", "intptr_t", "uintptr_t", "void*", "void*", "int32_t", "void*", "_2uint_struct_t"]
|
||||
# E e v c w i I C W u U f d D K l L p V O S 2 P G
|
||||
types = ["x86emu_t*", "x86emu_t**", "void", "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", "float", "double", "long double", "double", "intptr_t", "uintptr_t", "void*", "void*", "int32_t", "void*", "_2uint_struct_t", "void*", "void*"]
|
||||
if len(values) != len(types):
|
||||
raise NotImplementedError("len(values) = {lenval} != len(types) = {lentypes}".format(lenval=len(values), lentypes=len(types)))
|
||||
|
||||
@@ -337,8 +367,72 @@ typedef void (*wrapper_t)(x86emu_t* emu, uintptr_t fnc);
|
||||
file.write("#endif\n")
|
||||
|
||||
file.write("\n")
|
||||
|
||||
# Next part: function definitions
|
||||
|
||||
# Helper variables
|
||||
arg = [
|
||||
"emu, ", # E
|
||||
"&emu, ", # e
|
||||
"", # v
|
||||
"*(int8_t*)(R_ESP + {p}), ", # c
|
||||
"*(int16_t*)(R_ESP + {p}), ", # w
|
||||
"*(int32_t*)(R_ESP + {p}), ", # i
|
||||
"*(int64_t*)(R_ESP + {p}), ", # I
|
||||
"*(uint8_t*)(R_ESP + {p}), ", # C
|
||||
"*(uint16_t*)(R_ESP + {p}), ", # W
|
||||
"*(uint32_t*)(R_ESP + {p}), ", # u
|
||||
"*(uint64_t*)(R_ESP + {p}), ", # U
|
||||
"*(float*)(R_ESP + {p}), ", # f
|
||||
"*(double*)(R_ESP + {p}), ", # d
|
||||
"*(long double*)(R_ESP + {p}), ", # D
|
||||
"FromLD((void*)(R_ESP + {p})), ", # K
|
||||
"*(intptr_t*)(R_ESP + {p}), ", # l
|
||||
"*(uintptr_t*)(R_ESP + {p}), ", # L
|
||||
"*(void**)(R_ESP + {p}), ", # p
|
||||
"(void*)(R_ESP + {p}), ", # V
|
||||
"of_convert(*(int32_t*)(R_ESP + {p})), ", # O
|
||||
"io_convert(*(void**)(R_ESP + {p})), ", # S
|
||||
"(_2uint_struct_t){{*(uintptr_t*)(R_ESP + {p}),*(uintptr_t*)(R_ESP + {p} + 4)}}, ", #2
|
||||
"arg{p}, ", # P
|
||||
"&arg{p}, ", # G
|
||||
]
|
||||
# E e v c w i I C W u U f d D K l L p V O S 2 P G
|
||||
deltas = [0, 0, 4, 4, 4, 4, 8, 4, 4, 4, 8, 4, 8, 12, 12, 4, 4, 4, 0, 4, 4, 8, 4, 4]
|
||||
vals = [
|
||||
"\n#error Invalid return type: emulator\n", # E
|
||||
"\n#error Invalid return type: &emulator\n", # e
|
||||
"fn({0});", # v
|
||||
"R_EAX=fn({0});", # c
|
||||
"R_EAX=fn({0});", # w
|
||||
"R_EAX=fn({0});", # i
|
||||
"ui64_t r; r.i=fn({0}); R_EAX=r.d[0]; R_EDX=r.d[1];", # I
|
||||
"R_EAX=(unsigned char)fn({0});", # C
|
||||
"R_EAX=(unsigned short)fn({0});", # W
|
||||
"R_EAX=(uint32_t)fn({0});", # u
|
||||
"ui64_t r; r.u=(uint64_t)fn({0}); R_EAX=r.d[0]; R_EDX=r.d[1];", # U
|
||||
"float fl=fn({0}); fpu_do_push(emu); ST0val = fl;", # f
|
||||
"double db=fn({0}); fpu_do_push(emu); ST0val = db;", # d
|
||||
"long double ld=fn({0}); fpu_do_push(emu); ST0val = ld;", # D
|
||||
"double db=fn({0}); fpu_do_push(emu); ST0val = db;", # K
|
||||
"R_EAX=(intptr_t)fn({0});", # l
|
||||
"R_EAX=(uintptr_t)fn({0});", # L
|
||||
"R_EAX=(uintptr_t)fn({0});", # p
|
||||
"\n#error Invalid return type: va_list\n", # V
|
||||
"\n#error Invalid return type: at_flags\n", # O
|
||||
"\n#error Invalid return type: _io_file*\n", # S
|
||||
"\n#error Invalid return type: _2uint_struct\n", # 2
|
||||
"\n#error Invalid return type: Vulkan Struct\n", # P
|
||||
"\n#error Invalid return type: GValue Pointer\n", # G
|
||||
]
|
||||
# Asserts
|
||||
if len(values) != len(arg):
|
||||
raise NotImplementedError("len(values) = {lenval} != len(arg) = {lenarg}".format(lenval=len(values), lenarg=len(arg)))
|
||||
if len(values) != len(deltas):
|
||||
raise NotImplementedError("len(values) = {lenval} != len(deltas) = {lendeltas}".format(lenval=len(values), lendeltas=len(deltas)))
|
||||
if len(values) != len(vals):
|
||||
raise NotImplementedError("len(values) = {lenval} != len(vals) = {lenvals}".format(lenval=len(values), lenvals=len(vals)))
|
||||
|
||||
# Helper functions to write the function definitions
|
||||
def function_args(args, d=4):
|
||||
if len(args) == 0:
|
||||
@@ -351,67 +445,31 @@ typedef void (*wrapper_t)(x86emu_t* emu, uintptr_t fnc);
|
||||
elif args[0] == "1":
|
||||
return "1, " + function_args(args[1:], d)
|
||||
|
||||
arg = [
|
||||
"emu, ", # E
|
||||
"&emu, ", # e
|
||||
"", # v
|
||||
"*(int8_t*)(R_ESP + {p}), ", # c
|
||||
"*(int16_t*)(R_ESP + {p}), ", # w
|
||||
"*(int32_t*)(R_ESP + {p}), ", # i
|
||||
"*(int64_t*)(R_ESP + {p}), ", # I
|
||||
"*(uint8_t*)(R_ESP + {p}), ", # C
|
||||
"*(uint16_t*)(R_ESP + {p}), ", # W
|
||||
"*(uint32_t*)(R_ESP + {p}), ", # u
|
||||
"*(uint64_t*)(R_ESP + {p}), ", # U
|
||||
"*(float*)(R_ESP + {p}), ", # f
|
||||
"*(double*)(R_ESP + {p}), ", # d
|
||||
"*(long double*)(R_ESP + {p}), ", # D
|
||||
"FromLD((void*)(R_ESP + {p})), ", # K
|
||||
"*(intptr_t*)(R_ESP + {p}), ", # l
|
||||
"*(uintptr_t*)(R_ESP + {p}), ", # L
|
||||
"*(void**)(R_ESP + {p}), ", # p
|
||||
"(void*)(R_ESP + {p}), ", # V
|
||||
"of_convert(*(int32_t*)(R_ESP + {p})), ", # O
|
||||
"io_convert(*(void**)(R_ESP + {p})), ", # S
|
||||
"(_2uint_struct_t){{*(uintptr_t*)(R_ESP + {p}),*(uintptr_t*)(R_ESP + {p} + 4)}}, ", #2
|
||||
]
|
||||
# E e v c w i I C W u U f d D K l L p V O S 2
|
||||
deltas = [0, 0, 4, 4, 4, 4, 8, 4, 4, 4, 8, 4, 8, 12, 12, 4, 4, 4, 0, 4, 4, 8]
|
||||
if len(values) != len(arg):
|
||||
raise NotImplementedError("len(values) = {lenval} != len(arg) = {lenarg}".format(lenval=len(values), lenarg=len(arg)))
|
||||
if len(values) != len(deltas):
|
||||
raise NotImplementedError("len(values) = {lenval} != len(deltas) = {lendeltas}".format(lenval=len(values), lendeltas=len(deltas)))
|
||||
return arg[values.index(args[0])].format(p=d) + function_args(args[1:], d + deltas[values.index(args[0])])
|
||||
|
||||
def function_writer(f, N, W, rettype, args):
|
||||
f.write("void {0}(x86emu_t *emu, uintptr_t fcn) {2} {1} fn = ({1})fcn; ".format(N, W, "{"))
|
||||
vals = [
|
||||
"\n#error Invalid return type: emulator\n", # E
|
||||
"\n#error Invalid return type: &emulator\n", # e
|
||||
"fn({0});", # v
|
||||
"R_EAX=fn({0});", # c
|
||||
"R_EAX=fn({0});", # w
|
||||
"R_EAX=fn({0});", # i
|
||||
"ui64_t r; r.i=fn({0}); R_EAX=r.d[0]; R_EDX=r.d[1];", # I
|
||||
"R_EAX=(unsigned char)fn({0});", # C
|
||||
"R_EAX=(unsigned short)fn({0});", # W
|
||||
"R_EAX=(uint32_t)fn({0});", # u
|
||||
"ui64_t r; r.u=(uint64_t)fn({0}); R_EAX=r.d[0]; R_EDX=r.d[1];", # U
|
||||
"float fl=fn({0}); fpu_do_push(emu); ST0val = fl;", # f
|
||||
"double db=fn({0}); fpu_do_push(emu); ST0val = db;", # d
|
||||
"long double ld=fn({0}); fpu_do_push(emu); ST0val = ld;", # D
|
||||
"double db=fn({0}); fpu_do_push(emu); ST0val = db;", # K
|
||||
"R_EAX=(intptr_t)fn({0});", # l
|
||||
"R_EAX=(uintptr_t)fn({0});", # L
|
||||
"R_EAX=(uintptr_t)fn({0});", # p
|
||||
"\n#error Invalid return type: va_list\n", # V
|
||||
"\n#error Invalid return type: at_flags\n", # O
|
||||
"\n#error Invalid return type: _io_file*\n", # S
|
||||
"\n#error Invalid return type: _2uint_srtuct\n", # 2
|
||||
]
|
||||
if len(values) != len(vals):
|
||||
raise NotImplementedError("len(values) = {lenval} != len(vals) = {lenvals}".format(lenval=len(values), lenvals=len(vals)))
|
||||
f.write(vals[values.index(rettype)].format(function_args(args)[:-2]) + " }\n")
|
||||
if any(cc in 'PG' for cc in args):
|
||||
# Vulkan struct or GValue pointer, need to unwrap functions at the end
|
||||
delta = 4
|
||||
for c in args:
|
||||
if c == 'P':
|
||||
f.write("void* save{d}=NULL; void *arg{d} = VulkanFromx86(*(void**)(R_ESP + {d}), &save{d}); ".format(d=delta))
|
||||
if c == 'G':
|
||||
f.write("my_GValue_t arg{d}; alignGValue(&arg{d}, *(void**)(R_ESP + {d})); ".format(d=delta))
|
||||
delta = delta + deltas[values.index(c)]
|
||||
f.write(vals[values.index(rettype)].format(function_args(args)[:-2]) + " ")
|
||||
delta = 4
|
||||
for c in args:
|
||||
if c == 'P':
|
||||
f.write("VulkanTox86(arg{d}, save{d}); ".format(d=delta))
|
||||
if c == 'G':
|
||||
f.write("unalignGValue(*(void**)(R_ESP + {d}), &arg{d}); ".format(d=delta))
|
||||
delta = delta + deltas[values.index(c)]
|
||||
f.write("}\n")
|
||||
else:
|
||||
# Generic function
|
||||
f.write(vals[values.index(rettype)].format(function_args(args)[:-2]) + " }\n")
|
||||
|
||||
for v in gbl["()"]:
|
||||
function_writer(file, v, v + "_t", v[0], v[2:])
|
||||
|
||||
@@ -256,6 +256,7 @@ void finiAllHelpers()
|
||||
return;
|
||||
fini_pthread_helper();
|
||||
fini_signal_helper();
|
||||
cleanAlternate();
|
||||
finied = 1;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
|
||||
#define BOX86_MAJOR 0
|
||||
#define BOX86_MINOR 1
|
||||
#define BOX86_REVISION 4
|
||||
#define BOX86_REVISION 6
|
||||
|
||||
#endif //__BOX86_VERSION_H_
|
||||
@@ -387,12 +387,14 @@ Op is 20-27
|
||||
#define LDRH_REG(reg, addr, rm) EMIT(HWS_REG(c__, 1, 1, 0, 1, addr, reg, 0, 1, rm))
|
||||
#define STRH_REG(reg, addr, rm) EMIT(HWS_REG(c__, 1, 1, 0, 0, addr, reg, 0, 1, rm))
|
||||
|
||||
#define LDRHAI_REG_LSL_IMM5(reg, addr, rm) EMIT(HWS_REG(c__, 0, 1, 0, 1, addr, reg, 0, 1, rm))
|
||||
#define STRHAI_REG_LSL_IMM5(reg, addr, rm) EMIT(HWS_REG(c__, 0, 1, 0, 0, addr, reg, 0, 1, rm))
|
||||
#define LDRHB_IMM8(reg, addr, imm8) EMIT(HWS_OFF(c__, 1, (((imm8)<0)?0:1), 1, 1, addr, reg, 0, 1, abs(imm8)))
|
||||
#define LDRHA_IMM8(reg, addr, imm8) EMIT(HWS_OFF(c__, 0, (((imm8)<0)?0:1), 0, 1, addr, reg, 0, 1, abs(imm8)))
|
||||
#define STRHB_IMM8(reg, addr, imm8) EMIT(HWS_OFF(c__, 1, (((imm8)<0)?0:1), 1, 0, addr, reg, 0, 1, abs(imm8)))
|
||||
#define STRHA_IMM8(reg, addr, imm8) EMIT(HWS_OFF(c__, 0, (((imm8)<0)?0:1), 0, 0, addr, reg, 0, 1, abs(imm8)))
|
||||
#define LDRHAI_REG_LSL_IMM5(reg, addr, rm) EMIT(HWS_REG(c__, 0, 1, 0, 1, addr, reg, 0, 1, rm))
|
||||
#define STRHAI_REG_LSL_IMM5(reg, addr, rm) EMIT(HWS_REG(c__, 0, 1, 0, 0, addr, reg, 0, 1, rm))
|
||||
#define LDRHB_IMM8(reg, addr, imm8) EMIT(HWS_OFF(c__, 1, (((imm8)<0)?0:1), 1, 1, addr, reg, 0, 1, abs(imm8)))
|
||||
#define LDRHA_IMM8(reg, addr, imm8) EMIT(HWS_OFF(c__, 0, (((imm8)<0)?0:1), 0, 1, addr, reg, 0, 1, abs(imm8)))
|
||||
#define STRHB_IMM8(reg, addr, imm8) EMIT(HWS_OFF(c__, 1, (((imm8)<0)?0:1), 1, 0, addr, reg, 0, 1, abs(imm8)))
|
||||
#define STRHA_IMM8(reg, addr, imm8) EMIT(HWS_OFF(c__, 0, (((imm8)<0)?0:1), 0, 0, addr, reg, 0, 1, abs(imm8)))
|
||||
#define PUSH16(reg, addr) EMIT(HWS_OFF(c__, 1, 0, 1, 0, addr, reg, 0, 1, 2))
|
||||
#define POP16(reg, addr) EMIT(HWS_OFF(c__, 0, 1, 0, 1, addr, reg, 0, 1, 2))
|
||||
|
||||
// Mul Long construction
|
||||
#define MULLONG(Cond, U, A, S, RdHi, RdLo, Rs, Rm) (Cond | 0b00001<<23 | (U)<<22 | (A)<<21 | (S)<<20 | (RdHi)<<16 | (RdLo)<<12 | (Rs)<<8 | 0b1001<<4 | (Rm))
|
||||
@@ -704,6 +706,14 @@ Op is 20-27
|
||||
#define VMOV_igen(i, D, imm3, Vd, cmode, Q, op, imm4) (0b1111<<28 | 0b001<<25 | (i)<<24 | 1<<23 | (D)<<22 | (imm3)<<16 | (Vd)<<12 | (cmode)<<8 | (Q)<<6 | (op)<<5 | 1<<4 | (imm4))
|
||||
#define VMOV_8(Dd, imm) EMIT(VMOV_igen(((imm)>>7)&1, ((Dd)>>4)&1, ((imm)>>4)&7, (Dd)&15, 0b1110, 0, 0, (imm)&15))
|
||||
#define VMOVQ_8(Dd, imm) EMIT(VMOV_igen(((imm)>>7)&1, ((Dd)>>4)&1, ((imm)>>4)&7, (Dd)&15, 0b1110, 1, 0, (imm)&15))
|
||||
// Dd <= imm8 in high bits
|
||||
#define VMOV_H32(Dd, imm8) EMIT(VMOV_igen(((imm8)>>7)&1, ((Dd)>>4)&1, ((imm8)>>4)&7, (Dd)&15, 0b0110, 0, 0, (imm8)&15))
|
||||
// Dd <= imm8 in high bits
|
||||
#define VMOV_H16(Dd, imm8) EMIT(VMOV_igen(((imm8)>>7)&1, ((Dd)>>4)&1, ((imm8)>>4)&7, (Dd)&15, 0b1010, 0, 0, (imm8)&15))
|
||||
// Qd <= imm8 in high bits
|
||||
#define VMOVQ_H32(Dd, imm8) EMIT(VMOV_igen(((imm8)>>7)&1, ((Dd)>>4)&1, ((imm8)>>4)&7, (Dd)&15, 0b0110, 1, 0, (imm8)&15))
|
||||
// Qd <= imm8 in high bits
|
||||
#define VMOVQ_H16(Dd, imm8) EMIT(VMOV_igen(((imm8)>>7)&1, ((Dd)>>4)&1, ((imm8)>>4)&7, (Dd)&15, 0b1010, 1, 0, (imm8)&15))
|
||||
|
||||
#define VLD1LANE_gen(D, Rn, Vd, size, index_align, Rm) (0b1111<<28 | 0b0100<<24 | 1<<23 | (D)<<22 | 0b10<<20 | (Rn)<<16 | (Vd)<<12 | (size)<<10 | (index_align)<<4 | (Rm))
|
||||
#define VLD1LANE_8(Dd, Rn, index) EMIT(VLD1LANE_gen(((Dd)>>4)&1, Rn, (Dd)&15, 0, (index)<<1, 15))
|
||||
@@ -768,6 +778,14 @@ Op is 20-27
|
||||
#define VCEQ_F32(Dd, Dn, Dm) EMIT(VCEQ_F_gen(0, ((Dd)>>4)&1, (Dn)&15, (Dd)&15, ((Dn)>>4)&1, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCEQQ_F32(Dd, Dn, Dm) EMIT(VCEQ_F_gen(0, ((Dd)>>4)&1, (Dn)&15, (Dd)&15, ((Dn)>>4)&1, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
|
||||
#define VCEQ_0_gen(D, size, Vd, F, Q, M, Vm) (0b1111<<28 | 0b0011<<24 | 1<<23 | (D)<<22 | 0b11<<20 | (size)<<18 | 0b01<<16 | (Vd)<<12 | (F)<<10 | 0b010<<7 | (Q)<<6 | (M)<<5 | (Vm))
|
||||
#define VCEQ_0_8(Dd, Dm) EMIT(VCEQ_0_gen(((Dd)>>4)&1, 0, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCEQ_0_16(Dd, Dm) EMIT(VCEQ_0_gen(((Dd)>>4)&1, 1, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCEQ_0_32(Dd, Dm) EMIT(VCEQ_0_gen(((Dd)>>4)&1, 2, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCEQQ_0_8(Dd, Dm) EMIT(VCEQ_0_gen(((Dd)>>4)&1, 0, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCEQQ_0_16(Dd, Dm) EMIT(VCEQ_0_gen(((Dd)>>4)&1, 1, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCEQQ_0_32(Dd, Dm) EMIT(VCEQ_0_gen(((Dd)>>4)&1, 2, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
|
||||
#define VCGT_I_gen(U, D, size, Vn, Vd, N, Q, M, Vm) (0b1111<<28 | 0b001<<25 | (U)<<24 | 0<<23 | (D)<<22 | (size)<<20 | (Vn)<<16 | (Vd)<<12 | 0b0011<<8 | (N)<<7 | (Q)<<6 | (M)<<5 | (Vm))
|
||||
#define VCGT_U8(Dd, Dn, Dm) EMIT(VCGT_I_gen(1, ((Dd)>>4)&1, 0, (Dn)&15, (Dd)&15, ((Dn)>>4)&1, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCGTQ_U8(Dd, Dn, Dm) EMIT(VCGT_I_gen(1, ((Dd)>>4)&1, 0, (Dn)&15, (Dd)&15, ((Dn)>>4)&1, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
@@ -793,6 +811,15 @@ Op is 20-27
|
||||
#define VCGE_F32(Dd, Dn, Dm) EMIT(VCGE_F_gen(((Dd)>>4)&1, 0, (Dn)&15, (Dd)&15, ((Dn)>>4)&1, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCGEQ_F32(Dd, Dn, Dm) EMIT(VCGE_F_gen(((Dd)>>4)&1, 0, (Dn)&15, (Dd)&15, ((Dn)>>4)&1, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
|
||||
#define VCLT_0_gen(D, size, Vd, F, Q, M, Vm) (0b1111<<28 | 0b0011<<24 | 1<<23 | (D)<<22 | 0b11<<20 | (size)<<18 | 0b01<<16 | (Vd)<<12 | (F)<<10 | 0b100<<7 | (Q)<<6 | (M)<<5 | (Vm))
|
||||
#define VCLT_0_8(Dd, Dm) EMIT(VCLT_0_gen(((Dd)>>4)&1, 0, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCLT_0_16(Dd, Dm) EMIT(VCLT_0_gen(((Dd)>>4)&1, 1, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCLT_0_32(Dd, Dm) EMIT(VCLT_0_gen(((Dd)>>4)&1, 2, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCLTQ_0_8(Dd, Dm) EMIT(VCLT_0_gen(((Dd)>>4)&1, 0, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCLTQ_0_16(Dd, Dm) EMIT(VCLT_0_gen(((Dd)>>4)&1, 1, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VCLTQ_0_32(Dd, Dm) EMIT(VCLT_0_gen(((Dd)>>4)&1, 2, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
|
||||
|
||||
#define VSHR_gen(U, D, imm6, Vd, L, Q, M, Vm) (0b1111<<28 | 0b001<<25 | (U)<<24 | 1<<23 | (D)<<22 | (imm6)<<16 | (Vd)<<12 | (L)<<7 | (Q)<<6 | (M)<<5 | 1<<4 | (Vm))
|
||||
#define VSHR_U8(Dd, Dm, imm3) EMIT(VSHR_gen(1, ((Dd)>>4)&1, 0b001<<3 | (8-(imm3)), (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VSHR_S8(Dd, Dm, imm3) EMIT(VSHR_gen(0, ((Dd)>>4)&1, 0b001<<3 | (8-(imm3)), (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
@@ -1161,4 +1188,18 @@ Op is 20-27
|
||||
#define VQRDMULHQ_S16(Dd, Dn, Dm) EMIT(VQRDMULH_gen(((Dd)>>4)&1, 0b01, (Dn)&15, (Dd)&15, ((Dn)>>4)&1, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VQRDMULHQ_S32(Dd, Dn, Dm) EMIT(VQRDMULH_gen(((Dd)>>4)&1, 0b10, (Dn)&15, (Dd)&15, ((Dn)>>4)&1, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
|
||||
#define VDUP_sgen(D, imm4, Vd, Q, M, Vm) (0b1111<<28 | 0b0011<<24 | 1<<23 | (D)<<22 | 0b11<<20 | (imm4)<<16 | (Vd)<<12 | 0b1100<<8 | (Q)<<6 | (M)<<5 | (Vm))
|
||||
// Dd <= Dup(Dm[x])
|
||||
#define VDUP_32(Dd, Dm, x) EMIT(VDUP_sgen(((Dd)>>4)&1, (((x)<<3)|0b100), (Dd)&15, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
|
||||
#define VABS_vgen(D, size, Vd, F, Q, M, Vm) (0b1111<<28 | 0b0011<<24 | 1<<23 | (D)<<22 | 0b11<<20 | (size)<<18 | 0b01<<16 | (Vd)<<12 | (F)<<10 | 0b110<<7 | (Q)<<6 | (M)<<5 | (Vm))
|
||||
#define VABS_S32(Dd, Dm) EMIT(VABS_vgen(((Dd)>>4)&1, 2, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VABS_S16(Dd, Dm) EMIT(VABS_vgen(((Dd)>>4)&1, 1, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VABS_S8(Dd, Dm) EMIT(VABS_vgen(((Dd)>>4)&1, 0, (Dd)&15, 0, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VABS_F(Dd, Dm) EMIT(VABS_vgen(((Dd)>>4)&1, 2, (Dd)&15, 1, 0, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VABSQ_S32(Dd, Dm) EMIT(VABS_vgen(((Dd)>>4)&1, 2, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VABSQ_S16(Dd, Dm) EMIT(VABS_vgen(((Dd)>>4)&1, 1, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VABSQ_S8(Dd, Dm) EMIT(VABS_vgen(((Dd)>>4)&1, 0, (Dd)&15, 0, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
#define VABSQ_F(Dd, Dm) EMIT(VABS_vgen(((Dd)>>4)&1, 2, (Dd)&15, 1, 1, ((Dm)>>4)&1, (Dm)&15))
|
||||
|
||||
#endif //__ARM_EMITTER_H__
|
||||
+33
-12
@@ -453,8 +453,6 @@ void ConvertHash2Direct(dynablocklist_t* dynablocks)
|
||||
kh_destroy(dynablocks, dynablocks->blocks);
|
||||
dynablocks->blocks = NULL;
|
||||
dynablocks->direct = direct;
|
||||
// unlock
|
||||
pthread_rwlock_unlock(&dynablocks->rwlock_blocks);
|
||||
// move the one that doesn't fit to other dynablocks
|
||||
// first check if everything can be moved
|
||||
int ok = 1;
|
||||
@@ -494,11 +492,9 @@ void ConvertHash2Direct(dynablocklist_t* dynablocks)
|
||||
);
|
||||
kh_destroy(dynablocks, blocks);
|
||||
} else {
|
||||
pthread_rwlock_wrlock(&dynablocks->rwlock_blocks);
|
||||
dynablocks->blocks = blocks;
|
||||
dynarec_log(LOG_DEBUG, "Cannot convert dynablocks(%p) to pure direct\n", (void*)dynablocks->text);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// a block is 4096 byte, so get a low magic size or no block will get "direct" treatment
|
||||
@@ -546,15 +542,18 @@ dynablock_t *AddNewDynablock(dynablocklist_t* dynablocks, uintptr_t addr, int wi
|
||||
return block;
|
||||
|
||||
// Lock as write now!
|
||||
if(dynablocks->blocks)
|
||||
int need_unlock = 0;
|
||||
if(dynablocks->blocks) {
|
||||
pthread_rwlock_wrlock(&dynablocks->rwlock_blocks);
|
||||
need_unlock = 1;
|
||||
}
|
||||
// create and add new block
|
||||
dynarec_log(LOG_DUMP, "Ask for DynaRec Block creation @%p\n", (void*)addr);
|
||||
if(dynablocks->direct && (addr>=dynablocks->text) && (addr<(dynablocks->text+dynablocks->textsz))) {
|
||||
block = dynablocks->direct[addr-dynablocks->text] = (dynablock_t*)calloc(1, sizeof(dynablock_t));
|
||||
} else {
|
||||
if(dynablocks->textsz && ((addr<dynablocks->text) || (addr>=(dynablocks->text+dynablocks->textsz)))) {
|
||||
if(dynablocks->blocks)
|
||||
if(need_unlock)
|
||||
pthread_rwlock_unlock(&dynablocks->rwlock_blocks);
|
||||
//dynarec_log(LOG_INFO, "Warning: Refused to create a Direct Block that is out-of-bound: dynablocks=%p (%p:%p), addr=%p\n", dynablocks, (void*)(dynablocks->text), (void*)(dynablocks->text+dynablocks->textsz), (void*)addr);
|
||||
//*created = 0;
|
||||
@@ -566,7 +565,7 @@ dynablock_t *AddNewDynablock(dynablocklist_t* dynablocks, uintptr_t addr, int wi
|
||||
// Ooops, block is already there? retreive it and bail out
|
||||
dynarec_log(LOG_DUMP, "Block already exist in Hash Map\n");
|
||||
block = kh_value(dynablocks->blocks, k);
|
||||
if(dynablocks->blocks)
|
||||
if(need_unlock)
|
||||
pthread_rwlock_unlock(&dynablocks->rwlock_blocks);
|
||||
*created = 0;
|
||||
return block;
|
||||
@@ -582,7 +581,7 @@ dynablock_t *AddNewDynablock(dynablocklist_t* dynablocks, uintptr_t addr, int wi
|
||||
block->marks = kh_init(mark);
|
||||
|
||||
// create an empty block first, so if other thread want to execute the same block, they can, but using interpretor path
|
||||
if(dynablocks->blocks)
|
||||
if(need_unlock)
|
||||
pthread_rwlock_unlock(&dynablocks->rwlock_blocks);
|
||||
|
||||
*created = 1;
|
||||
@@ -593,7 +592,7 @@ dynablock_t *AddNewDynablock(dynablocklist_t* dynablocks, uintptr_t addr, int wi
|
||||
return NULL if block is not found / cannot be created.
|
||||
Don't create if create==0
|
||||
*/
|
||||
static dynablock_t* internalDBGetBlock(x86emu_t* emu, uintptr_t addr, int create, dynablock_t* current)
|
||||
static dynablock_t* internalDBGetBlock(x86emu_t* emu, uintptr_t addr, uintptr_t filladdr, int create, dynablock_t* current)
|
||||
{
|
||||
// try the quickest way first: get parent of current and check if ok!
|
||||
dynablocklist_t *dynablocks = NULL;
|
||||
@@ -628,7 +627,7 @@ static dynablock_t* internalDBGetBlock(x86emu_t* emu, uintptr_t addr, int create
|
||||
pthread_mutex_lock(&my_context->mutex_dyndump);
|
||||
// fill the block
|
||||
block->x86_addr = (void*)addr;
|
||||
FillBlock(block);
|
||||
FillBlock(block, filladdr);
|
||||
if(box86_dynarec_dump)
|
||||
pthread_mutex_unlock(&my_context->mutex_dyndump);
|
||||
|
||||
@@ -639,7 +638,7 @@ static dynablock_t* internalDBGetBlock(x86emu_t* emu, uintptr_t addr, int create
|
||||
|
||||
dynablock_t* DBGetBlock(x86emu_t* emu, uintptr_t addr, int create, dynablock_t** current)
|
||||
{
|
||||
dynablock_t *db = internalDBGetBlock(emu, addr, create, *current);
|
||||
dynablock_t *db = internalDBGetBlock(emu, addr, addr, create, *current);
|
||||
if(db && (db->need_test || (db->father && db->father->need_test))) {
|
||||
dynablock_t *father = db->father?db->father:db;
|
||||
uint32_t hash = father->nolinker?X31_hash_code(father->x86_addr, father->x86_size):0;
|
||||
@@ -651,7 +650,29 @@ dynablock_t* DBGetBlock(x86emu_t* emu, uintptr_t addr, int create, dynablock_t**
|
||||
// Free father, it's now invalid!
|
||||
FreeDynablock(father);
|
||||
// start again... (will create a new block)
|
||||
db = internalDBGetBlock(emu, addr, create, *current);
|
||||
db = internalDBGetBlock(emu, addr, addr, create, *current);
|
||||
} else {
|
||||
father->need_test = 0;
|
||||
protectDB((uintptr_t)father->x86_addr, father->x86_size);
|
||||
}
|
||||
}
|
||||
return db;
|
||||
}
|
||||
|
||||
dynablock_t* DBAlternateBlock(x86emu_t* emu, uintptr_t addr, uintptr_t filladdr)
|
||||
{
|
||||
dynarec_log(LOG_DEBUG, "Creating AlternateBlock at %p for %p\n", (void*)addr, (void*)filladdr);
|
||||
int create = 1;
|
||||
dynablock_t *db = internalDBGetBlock(emu, addr, filladdr, create, NULL);
|
||||
if(db && (db->need_test || (db->father && db->father->need_test))) {
|
||||
dynablock_t *father = db->father?db->father:db;
|
||||
uint32_t hash = father->nolinker?X31_hash_code(father->x86_addr, father->x86_size):0;
|
||||
if(hash!=father->hash) {
|
||||
dynarec_log(LOG_DEBUG, "Invalidating block %p from %p:%p (hash:%X/%X)%s with %d son(s)\n", father, father->x86_addr, father->x86_addr+father->x86_size, hash, father->hash, father->marks?" with Mark,":"", father->sons_size);
|
||||
// Free father, it's now invalid!
|
||||
FreeDynablock(father);
|
||||
// start again... (will create a new block)
|
||||
db = internalDBGetBlock(emu, addr, filladdr, create, NULL);
|
||||
} else {
|
||||
father->need_test = 0;
|
||||
protectDB((uintptr_t)father->x86_addr, father->x86_size);
|
||||
|
||||
@@ -5,6 +5,14 @@ typedef struct dynablocklist_s dynablocklist_t;
|
||||
typedef struct kh_dynablocks_s kh_dynablocks_t;
|
||||
typedef struct kh_mark_s kh_mark_t;
|
||||
|
||||
typedef union instsize_s {
|
||||
uint8_t c;
|
||||
struct {
|
||||
unsigned int x86:4;
|
||||
unsigned int nat:4;
|
||||
};
|
||||
} instsize_t;
|
||||
|
||||
typedef struct dynablock_s {
|
||||
dynablocklist_t* parent;
|
||||
kh_mark_t* marks; // List of blocks that marked this block
|
||||
@@ -22,6 +30,7 @@ typedef struct dynablock_s {
|
||||
int sons_size;
|
||||
dynablock_t* father; // set only in the case of a son
|
||||
int nolinker;
|
||||
instsize_t *instsize;
|
||||
} dynablock_t;
|
||||
|
||||
typedef struct dynablocklist_s {
|
||||
|
||||
+12
-4
@@ -103,7 +103,10 @@ void DynaCall(x86emu_t* emu, uintptr_t addr)
|
||||
ejb->emu = emu;
|
||||
ejb->jmpbuf_ok = 1;
|
||||
jmpbuf_reset = 1;
|
||||
setjmp((struct __jmp_buf_tag*)ejb->jmpbuf);
|
||||
if(setjmp((struct __jmp_buf_tag*)ejb->jmpbuf)) {
|
||||
printf_log(LOG_DEBUG, "Setjmp DynaCall, fs=0x%x\n", ejb->emu->segs[_FS]);
|
||||
addr = R_EIP; // not sure if it should still be inside DynaCall!
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef DYNAREC
|
||||
@@ -149,7 +152,10 @@ void DynaCall(x86emu_t* emu, uintptr_t addr)
|
||||
ejb->emu = emu;
|
||||
ejb->jmpbuf_ok = 1;
|
||||
jmpbuf_reset = 1;
|
||||
setjmp((struct __jmp_buf_tag*)ejb->jmpbuf);
|
||||
if(setjmp((struct __jmp_buf_tag*)ejb->jmpbuf)) {
|
||||
printf_log(LOG_DEBUG, "Setjmp inner DynaCall, fs=0x%x\n", ejb->emu->segs[_FS]);
|
||||
addr = R_EIP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,7 +189,8 @@ int DynaRun(x86emu_t* emu)
|
||||
ejb->emu = emu;
|
||||
ejb->jmpbuf_ok = 1;
|
||||
jmpbuf_reset = 1;
|
||||
setjmp((struct __jmp_buf_tag*)ejb->jmpbuf);
|
||||
if(setjmp((struct __jmp_buf_tag*)ejb->jmpbuf))
|
||||
printf_log(LOG_DEBUG, "Setjmp DynaRun, fs=0x%x\n", ejb->emu->segs[_FS]);
|
||||
}
|
||||
}
|
||||
#ifdef DYNAREC
|
||||
@@ -219,7 +226,8 @@ int DynaRun(x86emu_t* emu)
|
||||
ejb->emu = emu;
|
||||
ejb->jmpbuf_ok = 1;
|
||||
jmpbuf_reset = 1;
|
||||
setjmp((struct __jmp_buf_tag*)ejb->jmpbuf);
|
||||
if(setjmp((struct __jmp_buf_tag*)ejb->jmpbuf))
|
||||
printf_log(LOG_DEBUG, "Setjmp inner DynaRun, fs=0x%x\n", ejb->emu->segs[_FS]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,14 +159,44 @@ uint32_t needed_flags(dynarec_arm_t *dyn, int ninst, uint32_t setf, int recurse)
|
||||
return needed;
|
||||
}
|
||||
|
||||
instsize_t* addInst(instsize_t* insts, size_t* size, size_t* cap, int x86_size, int arm_size)
|
||||
{
|
||||
// x86 instruction is <16 bytes anyway
|
||||
if(!x86_size && !arm_size)
|
||||
return insts;
|
||||
int toadd;
|
||||
if(x86_size>arm_size)
|
||||
toadd = 1 + x86_size/15;
|
||||
else
|
||||
toadd = 1 + arm_size/15;
|
||||
if(*size+toadd>*cap) {
|
||||
*cap = *size+toadd;
|
||||
insts = (instsize_t*)realloc(insts, *cap*sizeof(instsize_t));
|
||||
}
|
||||
while(toadd) {
|
||||
if(x86_size>15)
|
||||
insts[*size].x86 = 15;
|
||||
else
|
||||
insts[*size].x86 = x86_size;
|
||||
x86_size -= insts[*size].x86;
|
||||
if(arm_size>15)
|
||||
insts[*size].nat = 15;
|
||||
else
|
||||
insts[*size].nat = arm_size;
|
||||
arm_size -= insts[*size].nat;
|
||||
++(*size);
|
||||
--toadd;
|
||||
}
|
||||
return insts;
|
||||
}
|
||||
|
||||
void arm_pass0(dynarec_arm_t* dyn, uintptr_t addr);
|
||||
void arm_pass1(dynarec_arm_t* dyn, uintptr_t addr);
|
||||
void arm_pass2(dynarec_arm_t* dyn, uintptr_t addr);
|
||||
void arm_pass3(dynarec_arm_t* dyn, uintptr_t addr);
|
||||
|
||||
void* FillBlock(dynablock_t* block) {
|
||||
void* FillBlock(dynablock_t* block, uintptr_t addr) {
|
||||
// init the helper
|
||||
uintptr_t addr = (uintptr_t)block->x86_addr;
|
||||
dynarec_arm_t helper = {0};
|
||||
helper.nolinker = box86_dynarec_linker?(block->parent->nolinker):1;
|
||||
helper.start = addr;
|
||||
@@ -235,9 +265,30 @@ void* FillBlock(dynablock_t* block) {
|
||||
}
|
||||
helper.arm_size = 0;
|
||||
arm_pass3(&helper, addr);
|
||||
if(sz!=helper.arm_size) {printf_log(LOG_NONE, "BOX86: Warning, size difference in block between pass2 (%d) & pass3 (%d)!\n", sz, helper.arm_size);}
|
||||
if(sz!=helper.arm_size) {
|
||||
printf_log(LOG_NONE, "BOX86: Warning, size difference in block between pass2 (%d) & pass3 (%d)!\n", sz, helper.arm_size);
|
||||
uint8_t *dump = (uint8_t*)helper.start;
|
||||
printf_log(LOG_NONE, "Dump of %d x86 opcodes:\n", helper.size);
|
||||
for(int i=0; i<helper.size; ++i) {
|
||||
printf_log(LOG_NONE, "%p:", dump);
|
||||
for(; dump<(uint8_t*)helper.insts[i+1].x86.addr; ++dump)
|
||||
printf_log(LOG_NONE, " %02X", *dump);
|
||||
printf_log(LOG_NONE, "\t%d -> %d\n", helper.insts[i].size2, helper.insts[i].size);
|
||||
}
|
||||
printf_log(LOG_NONE, " ------------\n");
|
||||
}
|
||||
// all done...
|
||||
__clear_cache(p, p+sz); // need to clear the cache before execution...
|
||||
// keep size of instructions for signal handling
|
||||
{
|
||||
size_t cap = helper.size+1;
|
||||
size_t size = 0;
|
||||
block->instsize = (instsize_t*)calloc(cap, sizeof(instsize_t));
|
||||
for(int i=0; i<helper.size; ++i)
|
||||
block->instsize = addInst(block->instsize, &size, &cap, helper.insts[i].x86.size, helper.insts[i].size/4);
|
||||
addInst(block->instsize, &size, &cap, 0, 0); // add a "end of block" mark, just in case
|
||||
}
|
||||
// ok, free the helper now
|
||||
free(helper.insts);
|
||||
free(helper.next);
|
||||
block->table = helper.table;
|
||||
@@ -249,7 +300,7 @@ void* FillBlock(dynablock_t* block) {
|
||||
block->block = p;
|
||||
block->nolinker = helper.nolinker;
|
||||
block->need_test = 0;
|
||||
block->x86_addr = (void*)start;
|
||||
//block->x86_addr = (void*)start;
|
||||
block->x86_size = end-start;
|
||||
if(box86_dynarec_largest<block->x86_size)
|
||||
box86_dynarec_largest = block->x86_size;
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
uintptr_t dynarec00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, int* ok, int* need_epilog)
|
||||
{
|
||||
uint8_t nextop, opcode;
|
||||
uintptr_t natcall;
|
||||
int retn;
|
||||
uint8_t gd, ed;
|
||||
int8_t i8;
|
||||
int32_t i32, j32, tmp;
|
||||
@@ -1550,7 +1548,8 @@ uintptr_t dynarec00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
|
||||
case 0xC2:
|
||||
INST_NAME("RETN");
|
||||
SETFLAGS(X_ALL, SF_SET); // Hack, set all flags (to an unknown state...)
|
||||
//SETFLAGS(X_ALL, SF_SET); // Hack, set all flags (to an unknown state...)
|
||||
READFLAGS(X_PEND); // lets play safe here too
|
||||
BARRIER(2);
|
||||
i32 = F16;
|
||||
retn_to_epilog(dyn, ninst, i32);
|
||||
@@ -1624,6 +1623,7 @@ uintptr_t dynarec00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
*need_epilog = 1;
|
||||
} else {
|
||||
MESSAGE(LOG_DUMP, "Native Call to %s\n", GetNativeName(GetNativeFnc(ip)));
|
||||
x87_forget(dyn, ninst, x3, x12, 0);
|
||||
MOV32(x12, ip+1); // read the 0xCC
|
||||
addr+=4+4;
|
||||
STM(xEmu, (1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)|(1<<10)|(1<<11)|(1<<12));
|
||||
@@ -2046,64 +2046,102 @@ uintptr_t dynarec00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
|
||||
case 0xE8:
|
||||
INST_NAME("CALL Id");
|
||||
SETFLAGS(X_ALL, SF_SET); // Hack to set flags to "dont'care" state
|
||||
i32 = F32S;
|
||||
if(addr+i32==0) {
|
||||
#if STEP == 3
|
||||
printf_log(LOG_NONE, "Warning, jump to 0x0 at %p (%p)\n", (void*)addr, (void*)(addr-1));
|
||||
printf_log(LOG_NONE, "Warning, CALL to 0x0 at %p (%p)\n", (void*)addr, (void*)(addr-1));
|
||||
#endif
|
||||
}
|
||||
if(isNativeCall(dyn, addr+i32, &natcall, &retn)) {
|
||||
BARRIER(1);
|
||||
BARRIER_NEXT(1);
|
||||
MOV32(x2, addr);
|
||||
PUSH(xESP, 1<<x2);
|
||||
MESSAGE(LOG_DUMP, "Native Call to %s (retn=%d)\n", GetNativeName(GetNativeFnc(natcall-1)), retn);
|
||||
// calling a native function
|
||||
MOV32(x12, natcall); // read the 0xCC
|
||||
STM(xEmu, (1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)|(1<<10)|(1<<11)|(1<<12));
|
||||
CALL_(x86Int3, -1, 0);
|
||||
LDM(xEmu, (1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)|(1<<10)|(1<<11)|(1<<12));
|
||||
MOV32(x3, natcall+2+4+4);
|
||||
CMPS_REG_LSL_IMM5(xEIP, x3, 0);
|
||||
B_MARK(cNE); // Not the expected address, exit dynarec block
|
||||
POP(xESP, (1<<xEIP)); // pop the return address
|
||||
if(retn) {
|
||||
ADD_IMM8(xESP, xESP, retn);
|
||||
}
|
||||
MOV32(x3, addr);
|
||||
CMPS_REG_LSL_IMM5(xEIP, x3, 0);
|
||||
B_MARK(cNE); // Not the expected address again
|
||||
LDR_IMM9(x1, xEmu, offsetof(x86emu_t, quit));
|
||||
CMPS_IMM8(x1, 1);
|
||||
B_NEXT(cNE); // not quitting, so lets continue
|
||||
MARK;
|
||||
jump_to_epilog(dyn, 0, xEIP, ninst);
|
||||
} else if ((i32==0) && ((PK(0)>=0x58) && (PK(0)<=0x5F))) {
|
||||
MESSAGE(LOG_DUMP, "Hack for Call 0, Pop reg\n");
|
||||
u8 = F8;
|
||||
gd = xEAX+(u8&7);
|
||||
MOV32(gd, addr-1);
|
||||
} else if (((addr+i32)>0x10000) && (PK(i32+0)==0x8B) && (((PK(i32+1))&0xC7)==0x04) && (PK(i32+2)==0x24) && (PK(i32+3)==0xC3)) {
|
||||
MESSAGE(LOG_DUMP, "Hack for Call x86.get_pc_thunk.reg\n");
|
||||
u8 = PK(i32+1);
|
||||
gd = xEAX+((u8&0x38)>>3);
|
||||
MOV32(gd, addr);
|
||||
} else {
|
||||
// regular call
|
||||
BARRIER(1);
|
||||
BARRIER_NEXT(1);
|
||||
if(!dyn->nolinker && (!dyn->insts || ninst!=dyn->size-1)) {
|
||||
PASS2(cstack_push(dyn, ninst, addr, dyn->insts[ninst+1].address, x1, x2);)
|
||||
//cstatck_push put addr in x2, don't need to put it again
|
||||
} else {
|
||||
PASS2(cstack_push(dyn, ninst, 0, 0, x1, x2);)
|
||||
*need_epilog = 0;
|
||||
*ok = 0;
|
||||
#if STEP == 0
|
||||
if ((i32==0) && ((PK(0)>=0x58) && (PK(0)<=0x5F)))
|
||||
tmp = 1;
|
||||
else if (((addr+i32)>0x10000) && (PK(i32+0)==0x8B) && (((PK(i32+1))&0xC7)==0x04) && (PK(i32+2)==0x24) && (PK(i32+3)==0xC3))
|
||||
tmp = 2;
|
||||
else if(isNativeCall(dyn, addr+i32, NULL, NULL))
|
||||
tmp = 3;
|
||||
else
|
||||
tmp = 0;
|
||||
#elif STEP < 2
|
||||
if ((i32==0) && ((PK(0)>=0x58) && (PK(0)<=0x5F)))
|
||||
tmp = dyn->insts[ninst].pass2choice = 1;
|
||||
else if (((addr+i32)>0x10000) && (PK(i32+0)==0x8B) && (((PK(i32+1))&0xC7)==0x04) && (PK(i32+2)==0x24) && (PK(i32+3)==0xC3))
|
||||
tmp = dyn->insts[ninst].pass2choice = 2;
|
||||
else if(isNativeCall(dyn, addr+i32, &dyn->insts[ninst].natcall, &dyn->insts[ninst].retn))
|
||||
tmp = dyn->insts[ninst].pass2choice = 3;
|
||||
else
|
||||
tmp = dyn->insts[ninst].pass2choice = 0;
|
||||
#else
|
||||
tmp = dyn->insts[ninst].pass2choice;
|
||||
#endif
|
||||
switch(tmp) {
|
||||
case 1:
|
||||
//SETFLAGS(X_ALL, SF_SET); // Hack to set flags to "dont'care" state
|
||||
MESSAGE(LOG_DUMP, "Hack for Call 0, Pop reg\n");
|
||||
u8 = F8;
|
||||
gd = xEAX+(u8&7);
|
||||
MOV32(gd, addr-1);
|
||||
break;
|
||||
case 2:
|
||||
SETFLAGS(X_ALL, SF_SET); // Hack to set flags to "dont'care" state
|
||||
MESSAGE(LOG_DUMP, "Hack for Call x86.get_pc_thunk.reg\n");
|
||||
u8 = PK(i32+1);
|
||||
gd = xEAX+((u8&0x38)>>3);
|
||||
MOV32(gd, addr);
|
||||
break;
|
||||
case 3:
|
||||
SETFLAGS(X_ALL, SF_SET); // Hack to set flags to "dont'care" state
|
||||
BARRIER(1);
|
||||
BARRIER_NEXT(1);
|
||||
MOV32(x2, addr);
|
||||
}
|
||||
PUSH(xESP, 1<<x2);
|
||||
jump_to_linker(dyn, addr+i32, 0, ninst);
|
||||
PUSH(xESP, 1<<x2);
|
||||
MESSAGE(LOG_DUMP, "Native Call to %s (retn=%d)\n", GetNativeName(GetNativeFnc(dyn->insts[ninst].natcall-1)), dyn->insts[ninst].retn);
|
||||
// calling a native function
|
||||
x87_forget(dyn, ninst, x3, x12, 0);
|
||||
MOV32(x12, dyn->insts[ninst].natcall); // read the 0xCC already
|
||||
STM(xEmu, (1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)|(1<<10)|(1<<11)|(1<<12));
|
||||
CALL_(x86Int3, -1, 0);
|
||||
LDM(xEmu, (1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)|(1<<10)|(1<<11)|(1<<12));
|
||||
MOV32(x3, dyn->insts[ninst].natcall+2+4+4);
|
||||
CMPS_REG_LSL_IMM5(xEIP, x3, 0);
|
||||
B_MARK(cNE); // Not the expected address, exit dynarec block
|
||||
POP(xESP, (1<<xEIP)); // pop the return address
|
||||
if(dyn->insts[ninst].retn) {
|
||||
ADD_IMM8(xESP, xESP, dyn->insts[ninst].retn);
|
||||
}
|
||||
MOV32(x3, addr);
|
||||
CMPS_REG_LSL_IMM5(xEIP, x3, 0);
|
||||
B_MARK(cNE); // Not the expected address again
|
||||
LDR_IMM9(x1, xEmu, offsetof(x86emu_t, quit));
|
||||
CMPS_IMM8(x1, 1);
|
||||
B_NEXT(cNE); // not quitting, so lets continue
|
||||
MARK;
|
||||
jump_to_epilog(dyn, 0, xEIP, ninst);
|
||||
break;
|
||||
default:
|
||||
if(ninst && dyn->insts && dyn->insts[ninst-1].x86.set_flags) {
|
||||
READFLAGS(X_PEND); // that's suspicious
|
||||
} else {
|
||||
SETFLAGS(X_ALL, SF_SET); // Hack to set flags to "dont'care" state
|
||||
}
|
||||
// regular call
|
||||
BARRIER(1);
|
||||
BARRIER_NEXT(1);
|
||||
if(!dyn->nolinker && (!dyn->insts || ninst!=dyn->size-1)) {
|
||||
PASS2(cstack_push(dyn, ninst, addr, dyn->insts[ninst+1].address, x1, x2);)
|
||||
//cstatck_push put addr in x2, don't need to put it again
|
||||
} else {
|
||||
PASS2(cstack_push(dyn, ninst, 0, 0, x1, x2);)
|
||||
*need_epilog = 0;
|
||||
*ok = 0;
|
||||
MOV32(x2, addr);
|
||||
}
|
||||
PUSH(xESP, 1<<x2);
|
||||
if(addr+i32==0) { // self modifying code maybe? so use indirect address fetching
|
||||
MOV32(x12, addr-4);
|
||||
LDR_IMM9(x12, x12, 0);
|
||||
}
|
||||
jump_to_linker(dyn, addr+i32, (addr+i32)?0:x12, ninst);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0xE9:
|
||||
@@ -2118,7 +2156,7 @@ uintptr_t dynarec00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
}
|
||||
JUMP(addr+i32);
|
||||
if(dyn->insts) {
|
||||
if(dyn->insts[ninst].x86.jmp_insts==-1) {
|
||||
PASS2IF(dyn->insts[ninst].x86.jmp_insts==-1, 1) {
|
||||
// out of the block
|
||||
jump_to_linker(dyn, addr+i32, 0, ninst);
|
||||
} else {
|
||||
@@ -2624,7 +2662,11 @@ uintptr_t dynarec00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
break;
|
||||
case 2: // CALL Ed
|
||||
INST_NAME("CALL Ed");
|
||||
SETFLAGS(X_ALL, SF_SET); //Hack to put flag in "don't care" state
|
||||
PASS2IF(ninst && dyn->insts && dyn->insts[ninst-1].x86.set_flags, 1) {
|
||||
READFLAGS(X_PEND); // that's suspicious
|
||||
} else {
|
||||
SETFLAGS(X_ALL, SF_SET); //Hack to put flag in "don't care" state
|
||||
}
|
||||
GETEDH(xEIP);
|
||||
BARRIER(1);
|
||||
BARRIER_NEXT(1);
|
||||
|
||||
@@ -80,6 +80,7 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
#endif
|
||||
|
||||
switch(opcode) {
|
||||
|
||||
case 0x0B:
|
||||
INST_NAME("UD2");
|
||||
SETFLAGS(X_ALL, SF_SET); // Hack to set flags in "don't care" state
|
||||
@@ -1711,6 +1712,37 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
AND_IMM8(x1, ed, 1);
|
||||
STR_IMM9(x1, xEmu, offsetof(x86emu_t, flags[F_CF]));
|
||||
break;
|
||||
case 5:
|
||||
INST_NAME("BTS Ed, Ib");
|
||||
SETFLAGS(X_CF, SF_SUBSET);
|
||||
gd = x2;
|
||||
if((nextop&0xC0)==0xC0) {
|
||||
ed = xEAX+(nextop&7);
|
||||
u8 = F8;
|
||||
MOVW(gd, u8);
|
||||
wback = 0;
|
||||
} else {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x3, &fixedaddress, 4095, 0);
|
||||
u8 = F8;
|
||||
MOVW(gd, u8);
|
||||
UBFX(x1, gd, 5, 3); // r1 = (gd>>5);
|
||||
ADD_REG_LSL_IMM5(x3, ed, x1, 2); //(&ed)+=r1*4;
|
||||
LDR_IMM9(x1, x3, fixedaddress);
|
||||
ed = x1;
|
||||
wback = x3;
|
||||
}
|
||||
AND_IMM8(x2, gd, 0x1f);
|
||||
MOV_REG_LSR_REG(x12, ed, x2);
|
||||
ANDS_IMM8(x12, x12, 1);
|
||||
STR_IMM9(x12, xEmu, offsetof(x86emu_t, flags[F_CF]));
|
||||
B_MARK3(cNE); // bit already set, jump to next instruction
|
||||
MOVW(x12, 1);
|
||||
XOR_REG_LSL_REG(ed, ed, x12, x2);
|
||||
if(wback) {
|
||||
STR_IMM9(ed, wback, fixedaddress);
|
||||
}
|
||||
MARK3;
|
||||
break;
|
||||
case 6:
|
||||
INST_NAME("BTR Ed, Ib");
|
||||
SETFLAGS(X_CF, SF_SUBSET);
|
||||
@@ -1742,6 +1774,36 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
}
|
||||
MARK3;
|
||||
break;
|
||||
case 7:
|
||||
INST_NAME("BTC Ed, Ib");
|
||||
SETFLAGS(X_CF, SF_SUBSET);
|
||||
gd = x2;
|
||||
if((nextop&0xC0)==0xC0) {
|
||||
ed = xEAX+(nextop&7);
|
||||
u8 = F8;
|
||||
MOVW(gd, u8);
|
||||
wback = 0;
|
||||
} else {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x3, &fixedaddress, 4095, 0);
|
||||
u8 = F8;
|
||||
MOVW(gd, u8);
|
||||
UBFX(x1, gd, 5, 3); // r1 = (gd>>5);
|
||||
ADD_REG_LSL_IMM5(x3, ed, x1, 2); //(&ed)+=r1*4;
|
||||
LDR_IMM9(x1, x3, fixedaddress);
|
||||
ed = x1;
|
||||
wback = x3;
|
||||
}
|
||||
AND_IMM8(x2, gd, 0x1f);
|
||||
MOV_REG_LSR_REG(x12, ed, x2);
|
||||
ANDS_IMM8(x12, x12, 1);
|
||||
STR_IMM9(x12, xEmu, offsetof(x86emu_t, flags[F_CF]));
|
||||
MOVW_COND(cEQ, x12, 1); // may already 0x01
|
||||
XOR_REG_LSL_REG(ed, ed, x12, x2);
|
||||
if(wback) {
|
||||
STR_IMM9(ed, wback, fixedaddress);
|
||||
}
|
||||
MARK3;
|
||||
break;
|
||||
default:
|
||||
DEFAULT;
|
||||
}
|
||||
@@ -2096,7 +2158,13 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
GETEM(d1);
|
||||
VQSUB_U16(d0, d0, d1);
|
||||
break;
|
||||
|
||||
case 0xDA:
|
||||
INST_NAME("PMINUB Gm, Em");
|
||||
nextop = F8;
|
||||
GETGM(d0);
|
||||
GETEM(d1);
|
||||
VMIN_U8(d0, d0, d1);
|
||||
break;
|
||||
case 0xDB:
|
||||
INST_NAME("PAND Gm, Em");
|
||||
nextop = F8;
|
||||
@@ -2118,7 +2186,13 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
GETEM(d1);
|
||||
VQADD_U16(d0, d0, d1);
|
||||
break;
|
||||
|
||||
case 0xDE:
|
||||
INST_NAME("PMAXUB Gm, Em");
|
||||
nextop = F8;
|
||||
GETGM(d0);
|
||||
GETEM(d1);
|
||||
VMAX_U8(d0, d0, d1);
|
||||
break;
|
||||
case 0xDF:
|
||||
INST_NAME("PANDN Gm, Em");
|
||||
nextop = F8;
|
||||
@@ -2210,7 +2284,7 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
VQADD_S16(d0, d0, d1);
|
||||
break;
|
||||
case 0xEE:
|
||||
INST_NAME("PMAXPS Gm, Em");
|
||||
INST_NAME("PMAXSW Gm, Em");
|
||||
nextop = F8;
|
||||
GETGM(d0);
|
||||
GETEM(d1);
|
||||
|
||||
@@ -34,6 +34,7 @@ uintptr_t dynarecFS(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
MAYUSE(j32);
|
||||
|
||||
switch(opcode) {
|
||||
|
||||
case 0x03:
|
||||
INST_NAME("ADD Gd, FS:Ed");
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
|
||||
@@ -28,12 +28,16 @@ uintptr_t dynarecGS(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
int32_t i32, j32;
|
||||
uint32_t u32;
|
||||
uint8_t gd, ed;
|
||||
uint8_t wback;
|
||||
uint8_t wback, wb1, wb2;
|
||||
uint8_t u8;
|
||||
int fixedaddress;
|
||||
|
||||
MAYUSE(j32);
|
||||
MAYUSE(wback);
|
||||
MAYUSE(wb2);
|
||||
|
||||
switch(opcode) {
|
||||
|
||||
case 0x03:
|
||||
INST_NAME("ADD Gd, GS:Ed");
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
@@ -74,6 +78,91 @@ uintptr_t dynarecGS(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
emit_cmp32(dyn, ninst, gd, ed, x3, x12);
|
||||
break;
|
||||
|
||||
case 0x80:
|
||||
case 0x82:
|
||||
nextop = F8;
|
||||
switch((nextop>>3)&7) {
|
||||
case 0: //ADD
|
||||
INST_NAME("ADD GS:Eb, Ib");
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
grab_tlsdata(dyn, addr, ninst, x1);
|
||||
GETEBO(x1);
|
||||
u8 = F8;
|
||||
emit_add8c(dyn, ninst, x1, u8, x2, x12);
|
||||
EBBACK;
|
||||
break;
|
||||
case 1: //OR
|
||||
INST_NAME("OR GS:Eb, Ib");
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
grab_tlsdata(dyn, addr, ninst, x1);
|
||||
GETEBO(x1);
|
||||
u8 = F8;
|
||||
emit_or8c(dyn, ninst, x1, u8, x2, x12);
|
||||
EBBACK;
|
||||
break;
|
||||
case 2: //ADC
|
||||
INST_NAME("ADC GS:Eb, Ib");
|
||||
READFLAGS(X_CF);
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
grab_tlsdata(dyn, addr, ninst, x1);
|
||||
GETEBO(x1);
|
||||
u8 = F8;
|
||||
emit_adc8c(dyn, ninst, x1, u8, x2, x12);
|
||||
EBBACK;
|
||||
break;
|
||||
case 3: //SBB
|
||||
INST_NAME("SBB GS:Eb, Ib");
|
||||
READFLAGS(X_CF);
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
grab_tlsdata(dyn, addr, ninst, x1);
|
||||
GETEBO(x1);
|
||||
u8 = F8;
|
||||
emit_sbb8c(dyn, ninst, x1, u8, x2, x12);
|
||||
EBBACK;
|
||||
break;
|
||||
case 4: //AND
|
||||
INST_NAME("AND GS:Eb, Ib");
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
grab_tlsdata(dyn, addr, ninst, x1);
|
||||
GETEBO(x1);
|
||||
u8 = F8;
|
||||
emit_and8c(dyn, ninst, x1, u8, x2, x12);
|
||||
EBBACK;
|
||||
break;
|
||||
case 5: //SUB
|
||||
INST_NAME("SUB GS:Eb, Ib");
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
grab_tlsdata(dyn, addr, ninst, x1);
|
||||
GETEBO(x1);
|
||||
u8 = F8;
|
||||
emit_sub8c(dyn, ninst, x1, u8, x2, x12);
|
||||
EBBACK;
|
||||
break;
|
||||
case 6: //XOR
|
||||
INST_NAME("XOR GS:Eb, Ib");
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
grab_tlsdata(dyn, addr, ninst, x1);
|
||||
GETEBO(x1);
|
||||
u8 = F8;
|
||||
emit_xor8c(dyn, ninst, x1, u8, x2, x12);
|
||||
EBBACK;
|
||||
break;
|
||||
case 7: //CMP
|
||||
INST_NAME("CMP GS:Eb, Ib");
|
||||
SETFLAGS(X_ALL, SF_SET);
|
||||
grab_tlsdata(dyn, addr, ninst, x1);
|
||||
GETEBO(x1);
|
||||
u8 = F8;
|
||||
if(u8) {
|
||||
MOVW(x2, u8);
|
||||
emit_cmp8(dyn, ninst, x1, x2, x3, x12);
|
||||
} else {
|
||||
emit_cmp8_0(dyn, ninst, x1, x3, x12);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x89:
|
||||
INST_NAME("MOV GS:Ed, Gd");
|
||||
grab_tlsdata(dyn, addr, ninst, x12);
|
||||
|
||||
@@ -325,8 +325,7 @@ uintptr_t dynarec66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
case 0x56:
|
||||
case 0x57:
|
||||
INST_NAME("PUSH Reg16");
|
||||
SUB_IMM8(xESP, xESP, 2);
|
||||
STRH_IMM8(xEAX+(opcode&7), xESP, 0); //TODO: use a single STRH pre-decrement instruction
|
||||
PUSH16(xEAX+(opcode&7), xESP);
|
||||
break;
|
||||
case 0x58:
|
||||
case 0x59:
|
||||
@@ -337,17 +336,45 @@ uintptr_t dynarec66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
case 0x5E:
|
||||
case 0x5F:
|
||||
INST_NAME("POP Reg16");
|
||||
LDRH_IMM8(x1, xESP, 0); //TODO: use a single LDRH post-increment instruction
|
||||
POP16(x1, xESP);
|
||||
BFI(xEAX+(opcode&7), x1, 0, 16);
|
||||
ADD_IMM8(xESP, xESP, 2);
|
||||
break;
|
||||
case 0x60:
|
||||
INST_NAME("PUSHA");
|
||||
MOV_REG(x1, xESP);
|
||||
PUSH16(xEAX, xESP);
|
||||
PUSH16(xECX, xESP);
|
||||
PUSH16(xEDX, xESP);
|
||||
PUSH16(xEBX, xESP);
|
||||
PUSH16(x1, xESP);
|
||||
PUSH16(xEBP, xESP);
|
||||
PUSH16(xESI, xESP);
|
||||
PUSH16(xEDI, xESP);
|
||||
break;
|
||||
case 0x61:
|
||||
INST_NAME("POPA");
|
||||
POP16(x1, xESP);
|
||||
BFI(xEDI, x1, 0, 16);
|
||||
POP16(x1, xESP);
|
||||
BFI(xESI, x1, 0, 16);
|
||||
POP16(x1, xESP);
|
||||
BFI(xEBP, x1, 0, 16);
|
||||
ADD_IMM8(xESP, xESP, 2); //POP16(xESP, xESP);
|
||||
POP16(x1, xESP);
|
||||
BFI(xEBX, x1, 0, 16);
|
||||
POP16(x1, xESP);
|
||||
BFI(xEDX, x1, 0, 16);
|
||||
POP16(x1, xESP);
|
||||
BFI(xECX, x1, 0, 16);
|
||||
POP16(x1, xESP);
|
||||
BFI(xEAX, x1, 0, 16);
|
||||
break;
|
||||
|
||||
case 0x68:
|
||||
INST_NAME("PUSH Iw");
|
||||
u16 = F16;
|
||||
MOVW(x2, u16);
|
||||
SUB_IMM8(xESP, xESP, 2);
|
||||
STRH_IMM8(x2, xESP, 0);
|
||||
PUSH16(x2, xESP);
|
||||
break;
|
||||
case 0x69:
|
||||
INST_NAME("IMUL Gw,Ew,Iw");
|
||||
@@ -365,8 +392,7 @@ uintptr_t dynarec66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
INST_NAME("PUSH Ib");
|
||||
i16 = F8S;
|
||||
MOVW(x2, i16);
|
||||
SUB_IMM8(xESP, xESP, 2);
|
||||
STRH_IMM8(x2, xESP, 0);
|
||||
PUSH16(x2, xESP);
|
||||
break;
|
||||
case 0x6B:
|
||||
INST_NAME("IMUL Gw,Ew,Ib");
|
||||
|
||||
@@ -172,7 +172,7 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 4095-8, 0);
|
||||
LDR_IMM9(x2, ed, fixedaddress);
|
||||
LDR_IMM9(x3, ed, fixedaddress+4);
|
||||
VMOVfrV_D(x2, x3, v0+1);
|
||||
VMOVtoV_D(v0+1,x2, x3);
|
||||
}
|
||||
break;
|
||||
case 0x17:
|
||||
@@ -334,6 +334,52 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
VSUBQ_16(q0, q0, v1);
|
||||
break;
|
||||
|
||||
case 0x08:
|
||||
INST_NAME("PSIGNB Gx, Ex");
|
||||
nextop = F8;
|
||||
GETGX(q0);
|
||||
GETEX(q1);
|
||||
v1 = fpu_get_scratch_quad(dyn);
|
||||
v0 = fpu_get_scratch_quad(dyn);
|
||||
VNEGNQ_8(v0, q0); // get NEG
|
||||
VCLTQ_0_8(v1, q1); // calculate mask
|
||||
VBICQ(q0, q0, v1); // apply not mask on dest
|
||||
VANDQ(v0, v0, v1); // apply mask on src
|
||||
VORRQ(q0, q0, v0); // merge
|
||||
VCEQQ_0_8(v1, q1); // handle case where Ex is 0
|
||||
VBICQ(q0, q0, v1);
|
||||
break;
|
||||
case 0x09:
|
||||
INST_NAME("PSIGNW Gx, Ex");
|
||||
nextop = F8;
|
||||
GETGX(q0);
|
||||
GETEX(q1);
|
||||
v1 = fpu_get_scratch_quad(dyn);
|
||||
v0 = fpu_get_scratch_quad(dyn);
|
||||
VNEGNQ_16(v0, q0); // get NEG
|
||||
VCLTQ_0_16(v1, q1); // calculate mask
|
||||
VBICQ(q0, q0, v1); // apply not mask on dest
|
||||
VANDQ(v0, v0, v1); // apply mask on src
|
||||
VORRQ(q0, q0, v0); // merge
|
||||
VCEQQ_0_16(v1, q1); // handle case where Ex is 0
|
||||
VBICQ(q0, q0, v1);
|
||||
break;
|
||||
case 0x0A:
|
||||
INST_NAME("PSIGND Gx, Ex");
|
||||
nextop = F8;
|
||||
GETGX(q0);
|
||||
GETEX(q1);
|
||||
v1 = fpu_get_scratch_quad(dyn);
|
||||
v0 = fpu_get_scratch_quad(dyn);
|
||||
VNEGNQ_32(v0, q0); // get NEG
|
||||
VCLTQ_0_32(v1, q1); // calculate mask
|
||||
VBICQ(q0, q0, v1); // apply not mask on dest
|
||||
VANDQ(v0, v0, v1); // apply mask on src
|
||||
VORRQ(q0, q0, v0); // merge
|
||||
VCEQQ_0_32(v1, q1); // handle case where Ex is 0
|
||||
VBICQ(q0, q0, v1);
|
||||
break;
|
||||
|
||||
case 0x0B:
|
||||
INST_NAME("PMULHRSW Gx,Ex");
|
||||
nextop = F8;
|
||||
@@ -341,6 +387,31 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
GETEX(q1);
|
||||
VQRDMULHQ_S16(q0, q0, q1);
|
||||
break;
|
||||
|
||||
case 0x1C:
|
||||
INST_NAME("PABSB Gx,Ex");
|
||||
nextop = F8;
|
||||
GETEX(q1);
|
||||
gd = (nextop&0x38)>>3;
|
||||
q0 = sse_get_reg_empty(dyn, ninst, x1, gd);
|
||||
VABSQ_S8(q0, q1);
|
||||
break;
|
||||
case 0x1D:
|
||||
INST_NAME("PABSW Gx,Ex");
|
||||
nextop = F8;
|
||||
GETEX(q1);
|
||||
gd = (nextop&0x38)>>3;
|
||||
q0 = sse_get_reg_empty(dyn, ninst, x1, gd);
|
||||
VABSQ_S16(q0, q1);
|
||||
break;
|
||||
case 0x1E:
|
||||
INST_NAME("PABSD Gx,Ex");
|
||||
nextop = F8;
|
||||
GETEX(q1);
|
||||
gd = (nextop&0x38)>>3;
|
||||
q0 = sse_get_reg_empty(dyn, ninst, x1, gd);
|
||||
VABSQ_S32(q0, q1);
|
||||
break;
|
||||
default:
|
||||
DEFAULT;
|
||||
}
|
||||
@@ -1377,10 +1448,15 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
if(v0==v1 && u8==0) {
|
||||
VMOVD(v0+1, v0);
|
||||
} else {
|
||||
q0 = fpu_get_scratch_quad(dyn);
|
||||
if(v0==v1)
|
||||
q0 = fpu_get_scratch_quad(dyn);
|
||||
else
|
||||
q0 = v0;
|
||||
VMOVD(q0, v0+(u8&1));
|
||||
VMOVD(q0+1, v1+((u8>>1)&1));
|
||||
VMOVQ(v0, q0);
|
||||
if(v0==v1) {
|
||||
VMOVQ(v0, q0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1593,7 +1669,17 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
GETEX(q0);
|
||||
VRHADDQ_U16(v0, v0, q0);
|
||||
break;
|
||||
|
||||
case 0xE4:
|
||||
INST_NAME("PMULHUW Gx,Ex");
|
||||
nextop = F8;
|
||||
GETGX(v0);
|
||||
GETEX(v1);
|
||||
q0 = fpu_get_scratch_quad(dyn);
|
||||
VMULL_U32_U16(q0, v0, v1);
|
||||
VSHRN_32(v0, q0, 16);
|
||||
VMULL_U32_U16(q0, v0+1, v1+1);
|
||||
VSHRN_32(v0+1, q0, 16);
|
||||
break;
|
||||
case 0xE5:
|
||||
INST_NAME("PMULHW Gx,Ex");
|
||||
nextop = F8;
|
||||
@@ -1648,7 +1734,13 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
GETEX(q0);
|
||||
VQSUBQ_S16(v0, v0, q0);
|
||||
break;
|
||||
|
||||
case 0xEA:
|
||||
INST_NAME("PMINSW Gx,Ex");
|
||||
nextop = F8;
|
||||
GETGX(v0);
|
||||
GETEX(q0);
|
||||
VMINQ_S16(v0, v0, q0);
|
||||
break;
|
||||
case 0xEB:
|
||||
INST_NAME("POR Gx,Ex");
|
||||
nextop = F8;
|
||||
@@ -1670,7 +1762,13 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
GETEX(q0);
|
||||
VQADDQ_S16(v0, v0, q0);
|
||||
break;
|
||||
|
||||
case 0xEE:
|
||||
INST_NAME("PMAXSW Gx,Ex");
|
||||
nextop = F8;
|
||||
GETGX(v0);
|
||||
GETEX(q0);
|
||||
VMAXQ_S16(v0, v0, q0);
|
||||
break;
|
||||
case 0xEF:
|
||||
INST_NAME("PXOR Gx,Ex");
|
||||
nextop = F8;
|
||||
|
||||
@@ -28,7 +28,6 @@ uintptr_t dynarec67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
int32_t i32, j32;
|
||||
uint32_t u32;
|
||||
uint8_t gd, ed;
|
||||
uint8_t wback;
|
||||
int fixedaddress;
|
||||
|
||||
MAYUSE(i32);
|
||||
@@ -65,10 +64,13 @@ uintptr_t dynarec67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
grab_fsdata(dyn, addr, ninst, x12);
|
||||
GETGD;
|
||||
if((nextop&0xC0)==0xC0) { // reg <= reg
|
||||
MOV_REG(gd, xEAX+(nextop&7));
|
||||
ed = xEAX+(nextop&7);
|
||||
if(ed!=gd) {
|
||||
BFI(gd, ed, 0, 16);
|
||||
}
|
||||
} else { // mem <= reg
|
||||
addr = geted16(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, 0, 0);
|
||||
LDR_REG_LSL_IMM5(gd, ed, x12, 0);
|
||||
LDR_REG_LSL_IMM5(gd, x12, ed, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -81,7 +83,7 @@ uintptr_t dynarec67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
} else {
|
||||
addr = geted16(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 0, 0);
|
||||
POP(xESP, (1<<x2));
|
||||
STR_REG_LSL_IMM5(x2, x1, x12, 0);
|
||||
STR_REG_LSL_IMM5(x2, x12, ed, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -511,7 +511,17 @@ uintptr_t dynarecF0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
|
||||
case 0x87:
|
||||
--addr;
|
||||
break;
|
||||
|
||||
case 0x90: // This is xchg reg, reg, so let's ignore the LOCK prefix...
|
||||
case 0x91:
|
||||
case 0x92:
|
||||
case 0x93:
|
||||
case 0x94:
|
||||
case 0x95:
|
||||
case 0x96:
|
||||
case 0x97:
|
||||
--addr;
|
||||
break;
|
||||
|
||||
case 0x0F:
|
||||
nextop = F8;
|
||||
switch(nextop) {
|
||||
|
||||
@@ -58,7 +58,7 @@ uintptr_t dynarecF20F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
MAYUSE(d0);
|
||||
|
||||
switch(nextop) {
|
||||
|
||||
|
||||
case 0x10:
|
||||
INST_NAME("MOVSD Gx, Ex");
|
||||
nextop = F8;
|
||||
|
||||
@@ -63,9 +63,10 @@ uintptr_t dynarecF30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
int v0, v1;
|
||||
int s0, s1, s2;
|
||||
int d0, d1;
|
||||
int q0;
|
||||
int q0, q1;
|
||||
int parity;
|
||||
|
||||
MAYUSE(q1);
|
||||
MAYUSE(s1);
|
||||
MAYUSE(s2);
|
||||
MAYUSE(j32);
|
||||
@@ -132,6 +133,38 @@ uintptr_t dynarecF30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
STR_IMM9(x2, ed, fixedaddress);
|
||||
}
|
||||
break;
|
||||
case 0x12:
|
||||
INST_NAME("MOVSLDUP Gx, Ex");
|
||||
nextop = F8;
|
||||
gd = (nextop&0x38)>>3;
|
||||
if((nextop&0xC0)==0xC0) {
|
||||
q1 = sse_get_reg(dyn, ninst, x1, nextop&7);
|
||||
} else {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 0, 0);
|
||||
q1 = fpu_get_scratch_quad(dyn);
|
||||
VLD1Q_64(q1, ed);
|
||||
}
|
||||
q0 = sse_get_reg_empty(dyn, ninst, x1, gd);
|
||||
VDUP_32(q0+0, q1+0, 0);
|
||||
VDUP_32(q0+1, q1+1, 0);
|
||||
break;
|
||||
|
||||
case 0x16:
|
||||
INST_NAME("MOVSHDUP Gx, Ex");
|
||||
nextop = F8;
|
||||
gd = (nextop&0x38)>>3;
|
||||
if((nextop&0xC0)==0xC0) {
|
||||
q1 = sse_get_reg(dyn, ninst, x1, nextop&7);
|
||||
} else {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 0, 0);
|
||||
q1 = fpu_get_scratch_quad(dyn);
|
||||
VLD1Q_64(q1, ed);
|
||||
}
|
||||
q0 = sse_get_reg_empty(dyn, ninst, x1, gd);
|
||||
VDUP_32(q0+0, q1+0, 1);
|
||||
VDUP_32(q0+1, q1+1, 1);
|
||||
break;
|
||||
|
||||
|
||||
case 0x1E:
|
||||
INST_NAME("NOP / ENDBR32 / ENDBR64");
|
||||
@@ -179,8 +212,15 @@ uintptr_t dynarecF30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
}
|
||||
VMOV_32(s0, d0*2);
|
||||
} else {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 1023, 3);
|
||||
VLDR_32(s0, ed, fixedaddress);
|
||||
parity = getedparity(dyn, ninst, addr, nextop, 3);
|
||||
if(parity) {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 1023, 3);
|
||||
VLDR_32(s0, ed, fixedaddress);
|
||||
} else {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 4095, 0);
|
||||
LDR_IMM9(x2, ed, fixedaddress);
|
||||
VMOVtoV(s0, x2);
|
||||
}
|
||||
}
|
||||
VCVT_S32_F32(s0, s0);
|
||||
VMOVfrV(gd, s0);
|
||||
@@ -201,8 +241,15 @@ uintptr_t dynarecF30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
}
|
||||
VMOV_32(s0, d0*2);
|
||||
} else {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 1023, 3);
|
||||
VLDR_32(s0, ed, fixedaddress);
|
||||
parity = getedparity(dyn, ninst, addr, nextop, 3);
|
||||
if(parity) {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 1023, 3);
|
||||
VLDR_32(s0, ed, fixedaddress);
|
||||
} else {
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 4095, 0);
|
||||
LDR_IMM9(x2, ed, fixedaddress);
|
||||
VMOVtoV(s0, x2);
|
||||
}
|
||||
}
|
||||
VCVTR_S32_F32(s0, s0);
|
||||
VMOVfrV(gd, s0);
|
||||
@@ -588,7 +635,7 @@ uintptr_t dynarecF30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
|
||||
addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, 4095-8, 0);
|
||||
LDR_IMM9(x2, ed, fixedaddress);
|
||||
LDR_IMM9(x3, ed, fixedaddress+4);
|
||||
VMOVfrV_D(x2, x3, v0);
|
||||
VMOVtoV_D(v0, x2, x3);
|
||||
}
|
||||
}
|
||||
gd = (nextop&0x38)>>3;
|
||||
|
||||
@@ -117,8 +117,10 @@ void arm_fbld(x86emu_t* emu, uint8_t* ed)
|
||||
|
||||
void arm_fild64(x86emu_t* emu, int64_t* ed)
|
||||
{
|
||||
ST0.d = *ed;
|
||||
STll(0).ll = *ed;
|
||||
int64_t tmp;
|
||||
memcpy(&tmp, ed, sizeof(tmp));
|
||||
ST0.d = tmp;
|
||||
STll(0).ll = tmp;
|
||||
STll(0).ref = ST0.ll;
|
||||
}
|
||||
|
||||
@@ -304,3 +306,29 @@ int getedparity(dynarec_arm_t* dyn, int ninst, uintptr_t addr, uint8_t nextop, i
|
||||
#undef F8
|
||||
#undef F32
|
||||
}
|
||||
|
||||
int isNativeCall(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t* calladdress, int* retn)
|
||||
{
|
||||
#define PK(a) *(uint8_t*)(addr+a)
|
||||
#define PK32(a) *(uint32_t*)(addr+a)
|
||||
|
||||
if(!addr)
|
||||
return 0;
|
||||
if(PK(0)==0xff && PK(1)==0x25) { // absolute jump, maybe the GOT
|
||||
uintptr_t a1 = (PK32(2)); // need to add a check to see if the address is from the GOT !
|
||||
addr = *(uint32_t*)a1;
|
||||
}
|
||||
if(addr<0x10000) // too low, that is suspicious
|
||||
return 0;
|
||||
onebridge_t *b = (onebridge_t*)(addr);
|
||||
if(b->CC==0xCC && b->S=='S' && b->C=='C' && b->w!=(wrapper_t)0 && b->f!=(uintptr_t)PltResolver) {
|
||||
// found !
|
||||
if(retn) *retn = (b->C3==0xC2)?b->N:0;
|
||||
if(calladdress) *calladdress = addr+1;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
#undef PK32
|
||||
#undef PK
|
||||
}
|
||||
|
||||
@@ -54,4 +54,7 @@ void fpu_reset_reg(dynarec_arm_t* dyn);
|
||||
// Get if ED will have the correct parity. Not emiting anything. Parity is 2 for DWORD or 3 for QWORD
|
||||
int getedparity(dynarec_arm_t* dyn, int ninst, uintptr_t addr, uint8_t nextop, int parity);
|
||||
|
||||
// Is what pointed at addr a native call? And if yes, to what function?
|
||||
int isNativeCall(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t* calladdress, int* retn);
|
||||
|
||||
#endif //__DYNAREC_ARM_FUNCTIONS_H__
|
||||
@@ -471,26 +471,6 @@ void grab_fsdata(dynarec_arm_t* dyn, uintptr_t addr, int ninst, int reg)
|
||||
MESSAGE(LOG_DUMP, "----FS: Offset\n");
|
||||
}
|
||||
|
||||
int isNativeCall(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t* calladdress, int* retn)
|
||||
{
|
||||
if(!addr)
|
||||
return 0;
|
||||
if(PK(0)==0xff && PK(1)==0x25) { // absolute jump, maybe the GOT
|
||||
uintptr_t a1 = (PK32(2)); // need to add a check to see if the address is from the GOT !
|
||||
addr = *(uint32_t*)a1;
|
||||
}
|
||||
if(addr<0x10000) // too low, that is suspicious
|
||||
return 0;
|
||||
onebridge_t *b = (onebridge_t*)(addr);
|
||||
if(b->CC==0xCC && b->S=='S' && b->C=='C' && b->w!=(wrapper_t)0) {
|
||||
// found !
|
||||
if(retn) *retn = (b->C3==0xC2)?b->N:0;
|
||||
if(calladdress) *calladdress = addr+1;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// x87 stuffs
|
||||
static void x87_reset(dynarec_arm_t* dyn, int ninst)
|
||||
{
|
||||
|
||||
@@ -132,6 +132,21 @@
|
||||
wb1 = 1; \
|
||||
ed = i; \
|
||||
}
|
||||
//GETEBO will use i for ed, i is also Offset, and can use r3 for wback.
|
||||
#define GETEBO(i) if((nextop&0xC0)==0xC0) { \
|
||||
wback = (nextop&7); \
|
||||
wb2 = (wback>>2); \
|
||||
wback = xEAX+(wback&3); \
|
||||
UXTB(i, wback, wb2); \
|
||||
wb1 = 0; \
|
||||
ed = i; \
|
||||
} else { \
|
||||
addr = geted(dyn, addr, ninst, nextop, &wback, x3, &fixedaddress, 0, 0); \
|
||||
ADD_REG_LSL_IMM5(wback, wback, i, 0); \
|
||||
LDRB_IMM9(i, wback, fixedaddress); \
|
||||
wb1 = 1; \
|
||||
ed = i; \
|
||||
}
|
||||
//GETSEB sign extend EB, will use i for ed, and can use r3 for wback.
|
||||
#define GETSEB(i) if((nextop&0xC0)==0xC0) { \
|
||||
wback = (nextop&7); \
|
||||
@@ -308,6 +323,14 @@
|
||||
#define NEW_BARRIER_INST
|
||||
#endif
|
||||
|
||||
#if STEP < 2
|
||||
#define PASS2IF(A, B) if(A)
|
||||
#elif STEP == 2
|
||||
#define PASS2IF(A, B) if(A) dyn->insts[ninst].pass2choice = B; if(dyn->insts[ninst].pass2choice == B)
|
||||
#else
|
||||
#define PASS2IF(A, B) if(dyn->insts[ninst].pass2choice == B)
|
||||
#endif
|
||||
|
||||
void arm_epilog();
|
||||
void* arm_linker(x86emu_t* emu, void** table, uintptr_t addr);
|
||||
|
||||
@@ -349,7 +372,6 @@ void* arm_linker(x86emu_t* emu, void** table, uintptr_t addr);
|
||||
#define call_c STEPNAME(call_c_)
|
||||
#define grab_fsdata STEPNAME(grab_fsdata_)
|
||||
#define grab_tlsdata STEPNAME(grab_tlsdata_)
|
||||
#define isNativeCall STEPNAME(isNativeCall_)
|
||||
#define emit_cmp8 STEPNAME(emit_cmp8)
|
||||
#define emit_cmp16 STEPNAME(emit_cmp16)
|
||||
#define emit_cmp32 STEPNAME(emit_cmp32)
|
||||
@@ -467,7 +489,6 @@ void iret_to_epilog(dynarec_arm_t* dyn, int ninst);
|
||||
void call_c(dynarec_arm_t* dyn, int ninst, void* fnc, int reg, int ret, uint32_t mask);
|
||||
void grab_fsdata(dynarec_arm_t* dyn, uintptr_t addr, int ninst, int reg);
|
||||
void grab_tlsdata(dynarec_arm_t* dyn, uintptr_t addr, int ninst, int reg);
|
||||
int isNativeCall(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t* calladdress, int* retn);
|
||||
void emit_lock(dynarec_arm_t* dyn, uintptr_t addr, int ninst);
|
||||
void emit_unlock(dynarec_arm_t* dyn, uintptr_t addr, int ninst);
|
||||
void emit_cmp8(dynarec_arm_t* dyn, int ninst, int s1, int s2, int s3, int s4);
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
#define FINI
|
||||
#define EMIT(A) \
|
||||
if(box86_dynarec_dump) {dynarec_log(LOG_NONE, "\t%08x\t%s\n", (A), arm_print(A));} \
|
||||
*(uint32_t*)(dyn->block) = A; \
|
||||
dyn->block += 4; dyn->arm_size += 4
|
||||
*(uint32_t*)(dyn->block) = A; \
|
||||
dyn->block += 4; dyn->arm_size += 4;\
|
||||
dyn->insts[ninst].size2 += 4
|
||||
|
||||
#define MESSAGE(A, ...) if(box86_dynarec_dump) dynarec_log(LOG_NONE, __VA_ARGS__)
|
||||
#define NEW_INST
|
||||
|
||||
@@ -10,10 +10,14 @@ typedef struct instruction_arm_s {
|
||||
uintptr_t address; // (start) address of the arm emited instruction
|
||||
uintptr_t epilog; // epilog of current instruction (can be start of next, of barrier stuff)
|
||||
int size; // size of the arm emited instruction
|
||||
int size2; // size of the arm emited instrucion after pass2
|
||||
uintptr_t mark, mark2, mark3;
|
||||
uintptr_t markf;
|
||||
uintptr_t markseg;
|
||||
uintptr_t marklock;
|
||||
int pass2choice;// value for choices that are fixed on pass2 for pass3
|
||||
uintptr_t natcall;
|
||||
int retn;
|
||||
} instruction_arm_t;
|
||||
|
||||
typedef struct dynarec_arm_s {
|
||||
|
||||
@@ -40,6 +40,7 @@ const char* DumpSection(Elf32_Shdr *s, char* SST) {
|
||||
GO(SHT_HIPROC);
|
||||
GO(SHT_LOUSER);
|
||||
GO(SHT_HIUSER);
|
||||
#ifdef SHT_GNU_versym
|
||||
GO(SHT_GNU_versym);
|
||||
GO(SHT_GNU_ATTRIBUTES);
|
||||
GO(SHT_GNU_HASH);
|
||||
@@ -51,6 +52,7 @@ const char* DumpSection(Elf32_Shdr *s, char* SST) {
|
||||
GO(SHT_SUNW_syminfo);
|
||||
GO(SHT_GNU_verdef);
|
||||
GO(SHT_GNU_verneed);
|
||||
#endif
|
||||
#undef GO
|
||||
default:
|
||||
sprintf(buff, "0x%X unknown type", s->sh_type);
|
||||
@@ -98,6 +100,7 @@ const char* DumpDynamic(Elf32_Dyn *s) {
|
||||
GO(DT_RUNPATH, 0);
|
||||
GO(DT_FLAGS, 0);
|
||||
GO(DT_ENCODING, 0);
|
||||
#ifdef DT_NUM
|
||||
GO(DT_NUM, 0);
|
||||
GO(DT_VALRNGLO, 0);
|
||||
GO(DT_GNU_PRELINKED, 0);
|
||||
@@ -133,6 +136,7 @@ const char* DumpDynamic(Elf32_Dyn *s) {
|
||||
GO(DT_VERNEEDNUM, 0);
|
||||
GO(DT_AUXILIARY, 0);
|
||||
GO(DT_FILTER, 0);
|
||||
#endif
|
||||
#undef GO
|
||||
default:
|
||||
sprintf(buff, "0x%X unknown type", s->d_tag);
|
||||
@@ -154,11 +158,13 @@ const char* DumpPHEntry(Elf32_Phdr *e)
|
||||
GO(PT_SHLIB);
|
||||
GO(PT_PHDR);
|
||||
GO(PT_TLS);
|
||||
#ifdef PT_NUM
|
||||
GO(PT_NUM);
|
||||
GO(PT_LOOS);
|
||||
GO(PT_GNU_EH_FRAME);
|
||||
GO(PT_GNU_STACK);
|
||||
GO(PT_GNU_RELRO);
|
||||
#endif
|
||||
#undef GO
|
||||
default: sprintf(buff, "type: %x, Off=%x vaddr=%p paddr=%p filesz=%u memsz=%u flags=%x align=%u", e->p_type, e->p_offset, (void*)e->p_vaddr, (void*)e->p_paddr, e->p_filesz, e->p_memsz, e->p_flags, e->p_align); break;
|
||||
}
|
||||
|
||||
+11
-1
@@ -459,7 +459,8 @@ int RelocateElfREL(lib_t *maplib, lib_t *local_maplib, elfheader_t* head, int cn
|
||||
}
|
||||
break;
|
||||
case R_386_JMP_SLOT:
|
||||
if(bind==STB_LOCAL) {
|
||||
// apply immediatly for gobject closure marshal or for LOCAL binding
|
||||
if(bind==STB_LOCAL || ((symname && strstr(symname, "g_cclosure_marshal_")==symname))) {
|
||||
if (!offs) {
|
||||
if(bind==STB_WEAK) {
|
||||
printf_log(LOG_INFO, "Warning: Weak Symbol %s not found, cannot apply R_386_JMP_SLOT @%p (%p)\n", symname, p, *(void**)p);
|
||||
@@ -990,6 +991,15 @@ dynablocklist_t* GetDynablocksFromAddress(box86context_t *context, uintptr_t add
|
||||
return context->dynablocks;
|
||||
if(box86_dynarec_forced)
|
||||
return context->dynablocks;
|
||||
// check if the adress has an alternate one
|
||||
if(hasAlternate((void*)addr))
|
||||
return context->dynablocks;
|
||||
//check if address is in an elf... if yes, grant a block (should I warn)
|
||||
Dl_info info;
|
||||
if(dladdr((void*)addr, &info)) {
|
||||
printf_log(LOG_INFO, "Address %p is in a native Elf memory space (function \"%s\" in %s)\n", (void*)addr, info.dli_sname, info.dli_fname);
|
||||
return NULL;
|
||||
}
|
||||
dynarec_log(LOG_INFO, "Address %p not found in Elf memory and is not a native call wrapper\n", (void*)addr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+12
-2
@@ -1126,7 +1126,12 @@
|
||||
GM.uw[i] = (tmp32s < 0) ? 0 : tmp32s;
|
||||
}
|
||||
NEXT;
|
||||
|
||||
_0f_0xDA: /* PMINUB Gm,Em */
|
||||
nextop = F8;
|
||||
GET_EM;
|
||||
for (int i=0; i<8; ++i)
|
||||
GM.ub[i] = (GM.ub[i]<EM->ub[i])?GM.ub[i]:EM->ub[i];
|
||||
NEXT;
|
||||
_0f_0xDB: /* PAND Gm,Em */
|
||||
nextop = F8;
|
||||
GET_EM;
|
||||
@@ -1148,7 +1153,12 @@
|
||||
GM.uw[i] = (tmp32u>65535) ? 65535 : tmp32u;
|
||||
}
|
||||
NEXT;
|
||||
|
||||
_0f_0xDE: /* PMAXUB Gm,Em */
|
||||
nextop = F8;
|
||||
GET_EM;
|
||||
for (int i=0; i<8; ++i)
|
||||
GM.ub[i] = (GM.ub[i]>EM->ub[i])?GM.ub[i]:EM->ub[i];
|
||||
NEXT;
|
||||
_0f_0xDF: /* PANDN Gm,Em */
|
||||
nextop = F8;
|
||||
GET_EM;
|
||||
|
||||
@@ -230,6 +230,15 @@
|
||||
GX.q[0]=(tmp8s)?0xffffffffffffffffLL:0LL;
|
||||
break;
|
||||
|
||||
case 0xD0: /* ADDSUBPS Gx, Ex */
|
||||
nextop = F8;
|
||||
GET_EX;
|
||||
GX.f[0] -= EX->f[0];
|
||||
GX.f[1] += EX->f[1];
|
||||
GX.f[2] -= EX->f[2];
|
||||
GX.f[3] += EX->f[3];
|
||||
break;
|
||||
|
||||
case 0xD6: /* MOVDQ2Q Gm, Ex */
|
||||
nextop = F8;
|
||||
GET_EX;
|
||||
|
||||
@@ -15,6 +15,19 @@
|
||||
GET_EX;
|
||||
EX->ud[0] = GX.ud[0];
|
||||
break;
|
||||
case 0x12: /* MOVSLDUP Gx, Ex */
|
||||
nextop = F8;
|
||||
GET_EX;
|
||||
GX.ud[1] = GX.ud[0] = EX->ud[0];
|
||||
GX.ud[3] = GX.ud[2] = EX->ud[2];
|
||||
break;
|
||||
|
||||
case 0x16: /* MOVSHDUP Gx, Ex */
|
||||
nextop = F8;
|
||||
GET_EX;
|
||||
GX.ud[1] = GX.ud[0] = EX->ud[1];
|
||||
GX.ud[3] = GX.ud[2] = EX->ud[3];
|
||||
break;
|
||||
|
||||
case 0x1E: /* NOP / ENDBR32 / ENDBR64 */
|
||||
nextop = F8;
|
||||
|
||||
+26
-1
@@ -1,3 +1,5 @@
|
||||
#define _GNU_SOURCE /* See feature_test_macros(7) */
|
||||
#include <dlfcn.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -67,6 +69,9 @@ void x86Int3(x86emu_t* emu)
|
||||
if(Peek(emu, 0)=='S' && Peek(emu, 1)=='C') // Signature for "Out of x86 door"
|
||||
{
|
||||
R_EIP += 2;
|
||||
#ifdef RK3399
|
||||
volatile // to avoid addr to be put in an VFPU register
|
||||
#endif
|
||||
uint32_t addr = Fetch32(emu);
|
||||
if(addr==0) {
|
||||
//printf_log(LOG_INFO, "%p:Exit x86 emu (emu=%p)\n", *(void**)(R_ESP), emu);
|
||||
@@ -89,7 +94,13 @@ void x86Int3(x86emu_t* emu)
|
||||
int post = 0;
|
||||
int perr = 0;
|
||||
uint32_t *pu32 = NULL;
|
||||
const char *s = GetNativeName((void*)addr);
|
||||
const char *s = NULL;
|
||||
{
|
||||
Dl_info info;
|
||||
if(dladdr((void*)addr, &info))
|
||||
s = info.dli_sname;
|
||||
}
|
||||
if(!s) s = GetNativeName((void*)addr);
|
||||
if(addr==(uintptr_t)PltResolver) {
|
||||
snprintf(buff, 256, "%s", " ... ");
|
||||
} else
|
||||
@@ -113,9 +124,16 @@ void x86Int3(x86emu_t* emu)
|
||||
tmp = *(char**)(R_ESP+4);
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d (,%d))", tid, *(void**)(R_ESP), s, (tmp)?tmp:"(nil)", *(int*)(R_ESP+8), *(int*)(R_ESP+12));
|
||||
perr = 1;
|
||||
} else if(strcmp(s, "mkdir")==0) {
|
||||
tmp = *(char**)(R_ESP+4);
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d)", tid, *(void**)(R_ESP), s, (tmp)?tmp:"(nil)", *(int*)(R_ESP+8));
|
||||
perr = 1;
|
||||
} else if(!strcmp(s, "fopen")) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, *(void**)(R_ESP), s, *(char**)(R_ESP+4), *(char**)(R_ESP+8));
|
||||
perr = 1;
|
||||
} else if(!strcmp(s, "freopen")) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %p)", tid, *(void**)(R_ESP), s, *(char**)(R_ESP+4), *(char**)(R_ESP+8), *(void**)(R_ESP+12));
|
||||
perr = 1;
|
||||
} else if(!strcmp(s, "fopen64")) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, *(void**)(R_ESP), s, *(char**)(R_ESP+4), *(char**)(R_ESP+8));
|
||||
perr = 2;
|
||||
@@ -140,6 +158,9 @@ void x86Int3(x86emu_t* emu)
|
||||
} else if(strstr(s, "__xstat64")==s) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, *(void**)(R_ESP), s, *(int32_t*)(R_ESP+4), *(char**)(R_ESP+8), *(char**)(R_ESP+8), *(void**)(R_ESP+12));
|
||||
perr = 1;
|
||||
} else if(strcmp(s, "__xstat")==0) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, *(void**)(R_ESP), s, *(int32_t*)(R_ESP+4), *(char**)(R_ESP+8), *(char**)(R_ESP+8), *(void**)(R_ESP+12));
|
||||
perr = 1;
|
||||
} else if(strstr(s, "__lxstat64")==s) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, *(void**)(R_ESP), s, *(int32_t*)(R_ESP+4), *(char**)(R_ESP+8), *(char**)(R_ESP+8), *(void**)(R_ESP+12));
|
||||
perr = 1;
|
||||
@@ -200,6 +221,10 @@ void x86Int3(x86emu_t* emu)
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(%08X, \"%s\", ...)", tid, *(void**)(R_ESP), s, *(uint32_t*)(R_ESP+4), pu32?((char*)(pu32)):"nil");
|
||||
} else if(strstr(s, "vfprintf")==s) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(%08X, \"%s\", ...)", tid, *(void**)(R_ESP), s, *(uint32_t*)(R_ESP+4), *(char**)(R_ESP+8));
|
||||
} else if(strstr(s, "vkGetInstanceProcAddr")==s) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, *(void**)(R_ESP), s, *(void**)(R_ESP+4), *(char**)(R_ESP+8));
|
||||
} else if(strstr(s, "vkGetDeviceProcAddr")==s) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, *(void**)(R_ESP), s, *(void**)(R_ESP+4), *(char**)(R_ESP+8));
|
||||
} else if(strstr(s, "sscanf")==s) {
|
||||
snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", ...)", tid, *(void**)(R_ESP), s, *(char**)(R_ESP+4), *(char**)(R_ESP+8));
|
||||
} else if(strstr(s, "XCreateWindow")==s) {
|
||||
|
||||
+7
-3
@@ -19,6 +19,7 @@
|
||||
#include "x87emu_private.h"
|
||||
#include "box86context.h"
|
||||
#include "my_cpuid.h"
|
||||
#include "bridge.h"
|
||||
#ifdef DYNAREC
|
||||
#include "../dynarec/arm_lock_helper.h"
|
||||
#endif
|
||||
@@ -125,7 +126,7 @@ int Run(x86emu_t *emu, int step)
|
||||
&&_0f_0xC0, &&_0f_0xC1, &&_0f_0xC2, &&_0f_0xC3, &&_0f_0xC4, &&_0f_0xC5, &&_0f_0xC6, &&_0f_0xC7,
|
||||
&&_0f_0xC8, &&_0f_0xC9, &&_0f_0xCA, &&_0f_0xCB, &&_0f_0xCC, &&_0f_0xCD, &&_0f_0xCE, &&_0f_0xCF, //0xC8-0xCF
|
||||
&&_default, &&_0f_0xD1, &&_0f_0xD2, &&_0f_0xD3, &&_0f_0xD4 ,&&_0f_0xD5, &&_default, &&_0f_0xD7, //0xD0-0xD7
|
||||
&&_0f_0xD8, &&_0f_0xD9, &&_default, &&_0f_0xDB, &&_0f_0xDC ,&&_0f_0xDD, &&_default, &&_0f_0xDF, //0xD8-0xDF
|
||||
&&_0f_0xD8, &&_0f_0xD9, &&_0f_0xDA, &&_0f_0xDB, &&_0f_0xDC ,&&_0f_0xDD, &&_0f_0xDE, &&_0f_0xDF, //0xD8-0xDF
|
||||
&&_0f_0xE0, &&_0f_0xE1, &&_0f_0xE2, &&_0f_0xE3, &&_0f_0xE4 ,&&_0f_0xE5, &&_default, &&_0f_0xE7, //0xE0-0xE7
|
||||
&&_0f_0xE8, &&_0f_0xE9, &&_0f_0xEA, &&_0f_0xEB, &&_0f_0xEC ,&&_0f_0xED, &&_0f_0xEE, &&_0f_0xEF, //0xE8-0xEF
|
||||
&&_default, &&_0f_0xF1, &&_0f_0xF2, &&_0f_0xF3, &&_0f_0xF4 ,&&_0f_0xF5, &&_0f_0xF6, &&_0f_0xF7, //0xF0-0xF7
|
||||
@@ -695,6 +696,8 @@ _trace:
|
||||
GET_EW;
|
||||
emu->segs[((nextop&0x38)>>3)] = EW->word[0];
|
||||
emu->segs_clean[((nextop&0x38)>>3)] = 0;
|
||||
if(((nextop&0x38)>>3)==_FS)
|
||||
default_fs = EW->word[0];
|
||||
NEXT;
|
||||
_0x8F: /* POP Ed */
|
||||
nextop = F8;
|
||||
@@ -1528,8 +1531,9 @@ _trace:
|
||||
ED->dword[0] = dec32(emu, ED->dword[0]);
|
||||
break;
|
||||
case 2: /* CALL NEAR Ed */
|
||||
tmp32u = (uintptr_t)getAlternate((void*)ED->dword[0]);
|
||||
Push(emu, ip);
|
||||
ip = ED->dword[0]; // should get value in temp var. in case ED use ESP?
|
||||
ip = tmp32u;
|
||||
STEP
|
||||
break;
|
||||
case 3: /* CALL FAR Ed */
|
||||
@@ -1549,7 +1553,7 @@ _trace:
|
||||
}
|
||||
break;
|
||||
case 4: /* JMP NEAR Ed */
|
||||
ip = ED->dword[0];
|
||||
ip = (uintptr_t)getAlternate((void*)ED->dword[0]);
|
||||
STEP
|
||||
break;
|
||||
case 5: /* JMP FAR Ed */
|
||||
|
||||
@@ -473,6 +473,32 @@ void RunLock(x86emu_t *emu)
|
||||
nextop = F8;
|
||||
GET_ED;
|
||||
#ifdef DYNAREC
|
||||
if(((uintptr_t)ED)&7) {
|
||||
// unaligned!!!
|
||||
uint64_t ref = R_EDX;
|
||||
ref = ref<<32 | R_EAX;
|
||||
void* p = (void*)(((uintptr_t)ED + 3)&~3);
|
||||
int d = (((uintptr_t)p - (uintptr_t)ED))*8;
|
||||
do {
|
||||
uint64_t m = *(uint64_t*)ED;
|
||||
m&=~((0xffffffffLL)<<d);
|
||||
tmp32u = arm_lock_read_d(p);
|
||||
m|=((uint64_t)tmp32u)<<d;
|
||||
if(ref == m) {
|
||||
SET_FLAG(F_ZF);
|
||||
m = ((uint64_t)R_ECX)<<32 | R_EBX;
|
||||
tmp32u2 = m>>d;
|
||||
tmp32s = arm_lock_write_d(p, tmp32u2);
|
||||
if(!tmp32s)
|
||||
*(uint64_t*)ED = m;
|
||||
} else {
|
||||
CLEAR_FLAG(F_ZF);
|
||||
R_EAX = m&0xffffffff;
|
||||
R_EDX = m>>32;
|
||||
tmp32s = 0;
|
||||
}
|
||||
} while(tmp32s);
|
||||
} else
|
||||
do {
|
||||
arm_lock_read_dd(&tmp32u, &tmp32u2, ED);
|
||||
if(R_EAX == tmp32u && R_EDX == tmp32u2) {
|
||||
@@ -547,6 +573,16 @@ void RunLock(x86emu_t *emu)
|
||||
case 0x87: /* XCHG Ed,Gd */
|
||||
ip--; // let the normal XCHG execute, it have integrated LOCK
|
||||
break;
|
||||
case 0x90: // This is xchg reg, reg, so let's ignore the LOCK prefix...
|
||||
case 0x91:
|
||||
case 0x92:
|
||||
case 0x93:
|
||||
case 0x94:
|
||||
case 0x95:
|
||||
case 0x96:
|
||||
case 0x97:
|
||||
ip--;
|
||||
break;
|
||||
case 0xFF: /* GRP 5 Ed */
|
||||
nextop = F8;
|
||||
GET_ED;
|
||||
@@ -823,6 +859,29 @@ void RunFS(x86emu_t *emu)
|
||||
int32_t tmp32s;
|
||||
uintptr_t tlsdata = GetFSBaseEmu(emu);
|
||||
switch(opcode) {
|
||||
case 0x01: /* ADD FS:Ed, Gd */
|
||||
nextop = F8;
|
||||
GET_ED_OFFS(tlsdata);
|
||||
ED->dword[0] = add32(emu, ED->dword[0], GD.dword[0]);
|
||||
break;
|
||||
|
||||
case 0x03: /* ADD Gd, FS:Ed */
|
||||
nextop = F8;
|
||||
GET_ED_OFFS(tlsdata);
|
||||
GD.dword[0] = add32(emu, GD.dword[0], ED->dword[0]);
|
||||
break;
|
||||
|
||||
case 0x11: /* ADC FS:Ed, Gd */
|
||||
nextop = F8;
|
||||
GET_ED_OFFS(tlsdata);
|
||||
ED->dword[0] = adc32(emu, ED->dword[0], GD.dword[0]);
|
||||
|
||||
case 0x2B: /* SUB Gd, FS:Ed */
|
||||
nextop = F8;
|
||||
GET_ED_OFFS(tlsdata);
|
||||
GD.dword[0] = sub32(emu, GD.dword[0], ED->dword[0]);
|
||||
break;
|
||||
|
||||
case 0x33: /* XOR Gd,Ed */
|
||||
nextop = F8;
|
||||
GET_ED_OFFS(tlsdata);
|
||||
@@ -953,6 +1012,18 @@ void RunFS(x86emu_t *emu)
|
||||
GET_ED_OFFS(tlsdata);
|
||||
GD.dword[0] = ED->dword[0];
|
||||
break;
|
||||
case 0x8C: /* MOV FS:Ed, Seg */
|
||||
nextop = F8;
|
||||
GET_ED_OFFS(tlsdata);
|
||||
ED->dword[0] = emu->segs[((nextop&0x38)>>3)];
|
||||
break;
|
||||
|
||||
case 0x8E: /* MOV Seg,FS:Ed */
|
||||
nextop = F8;
|
||||
GET_ED_OFFS(tlsdata);
|
||||
emu->segs[((nextop&0x38)>>3)] = ED->word[0];
|
||||
emu->segs_clean[((nextop&0x38)>>3)] = 0;
|
||||
break;
|
||||
case 0x8F: /* POP Ed */
|
||||
nextop = F8;
|
||||
GET_ED_OFFS(tlsdata);
|
||||
|
||||
@@ -57,15 +57,15 @@ int32_t EXPORT my___libc_start_main(x86emu_t* emu, int *(main) (int, char * *, c
|
||||
const char* GetNativeName(void* p)
|
||||
{
|
||||
static char unknown[10] = "???";
|
||||
const char *ret = GetNameOffset(my_context->maplib, p);
|
||||
if(ret)
|
||||
return ret;
|
||||
|
||||
static char buff[500] = {0};
|
||||
Dl_info info;
|
||||
if(dladdr(p, &info)==0)
|
||||
if(dladdr(p, &info)==0) {
|
||||
const char *ret = GetNameOffset(my_context->maplib, p);
|
||||
if(ret)
|
||||
return ret;
|
||||
return unknown;
|
||||
else {
|
||||
} else {
|
||||
if(info.dli_sname) {
|
||||
strcpy(buff, info.dli_sname);
|
||||
if(info.dli_fname) {
|
||||
@@ -806,6 +806,7 @@ void PrintTrace(x86emu_t* emu, uintptr_t ip, int dynarec)
|
||||
my_context->trace_tid = tid;
|
||||
}
|
||||
#endif
|
||||
trace_end = 0;
|
||||
printf_log(LOG_NONE, "%s", DumpCPURegs(emu, ip));
|
||||
if(PK(0)==0xcc && PK(1)=='S' && PK(2)=='C') {
|
||||
uint32_t a = *(uint32_t*)(ip+3);
|
||||
|
||||
@@ -200,6 +200,8 @@ scwrap_t syscallwrap[] = {
|
||||
//{ 221, __NR_fcntl64, 3 },
|
||||
{ 224, __NR_gettid, 0 },
|
||||
{ 240, __NR_futex, 6 },
|
||||
{ 241, __NR_sched_setaffinity, 3 },
|
||||
{ 242, __NR_sched_getaffinity, 3 },
|
||||
{ 252, __NR_exit_group, 1 },
|
||||
#ifdef NOALIGN
|
||||
{ 254, __NR_epoll_create, 1 },
|
||||
|
||||
@@ -35,6 +35,7 @@ typedef struct dynmap_s {
|
||||
#endif
|
||||
|
||||
typedef void* (*procaddess_t)(const char* name);
|
||||
typedef void* (*vkprocaddess_t)(void* instance, const char* name);
|
||||
|
||||
#define MAX_SIGNAL 64
|
||||
|
||||
@@ -111,6 +112,9 @@ typedef struct box86context_s {
|
||||
procaddess_t glxprocaddress;
|
||||
kh_symbolmap_t *alwrappers; // the map of wrapper for alGetProcAddress
|
||||
kh_symbolmap_t *almymap; // link to the mysymbolmap if libOpenAL
|
||||
kh_symbolmap_t *vkwrappers; // the map of wrapper for VulkanProcs (TODO: check SDL2)
|
||||
kh_symbolmap_t *vkmymap; // link to the mysymbolmap of libGL
|
||||
vkprocaddess_t vkprocaddress;
|
||||
|
||||
callbacklist_t *callbacks; // all callbacks
|
||||
|
||||
@@ -190,6 +194,7 @@ typedef struct box86context_s {
|
||||
|
||||
uintptr_t signals[MAX_SIGNAL];
|
||||
uintptr_t restorer[MAX_SIGNAL];
|
||||
int onstack[MAX_SIGNAL];
|
||||
int is_sigaction[MAX_SIGNAL];
|
||||
x86emu_t *emu_sig; // the emu with stack used for signal handling (must be separated from main ones)
|
||||
int no_sigsegv;
|
||||
|
||||
@@ -12,7 +12,13 @@ void FreeBridge(bridge_t** bridge);
|
||||
uintptr_t AddBridge(bridge_t* bridge, wrapper_t w, void* fnc, int N);
|
||||
uintptr_t CheckBridged(bridge_t* bridge, void* fnc);
|
||||
uintptr_t AddCheckBridge(bridge_t* bridge, wrapper_t w, void* fnc, int N);
|
||||
uintptr_t AddAutomaticBridge(x86emu_t* emu, bridge_t* bridge, wrapper_t w, void* fnc, int N);
|
||||
void* GetNativeFnc(uintptr_t fnc);
|
||||
void* GetNativeFncOrFnc(uintptr_t fnc);
|
||||
|
||||
int hasAlternate(void* addr);
|
||||
void* getAlternate(void* addr);
|
||||
void addAlternate(void* addr, void* alt);
|
||||
void cleanAlternate();
|
||||
|
||||
#endif //__BRIDGE_H_
|
||||
+1
-1
@@ -30,7 +30,7 @@ extern uintptr_t trace_start, trace_end;
|
||||
extern box86context_t *my_context; // global context
|
||||
extern char* trace_func;
|
||||
extern uintptr_t fmod_smc_start, fmod_smc_end; // to handle libfmod (from Unreal) SMC (self modifying code)
|
||||
extern uint16_t default_fs;
|
||||
extern uint32_t default_fs;
|
||||
extern int jit_gdb; // launch gdb when a segfault is trapped
|
||||
#define LOG_NONE 0
|
||||
#define LOG_INFO 1
|
||||
|
||||
@@ -28,6 +28,7 @@ void MarkDirectDynablock(dynablocklist_t* dynablocks, uintptr_t addr, uintptr_t
|
||||
|
||||
// Handling of Dynarec block (i.e. an exectable chunk of x86 translated code)
|
||||
dynablock_t* DBGetBlock(x86emu_t* emu, uintptr_t addr, int create, dynablock_t** current); // return NULL if block is not found / cannot be created. Don't create if create==0
|
||||
dynablock_t* DBAlternateBlock(x86emu_t* emu, uintptr_t addr, uintptr_t filladdr);
|
||||
|
||||
// source is linked to dest (i.e. source->table[x] = dest->block), so add a "mark" in dest, add a "linked" info to source
|
||||
void AddMark(dynablock_t* source, dynablock_t* dest, void** table);
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
typedef struct dynablock_s dynablock_t;
|
||||
typedef struct x86emu_s x86emu_t;
|
||||
|
||||
void* FillBlock(dynablock_t* block);
|
||||
void* FillBlock(dynablock_t* block, uintptr_t addr);
|
||||
|
||||
#endif //__DYNAREC_ARM_H_
|
||||
+78
-6
@@ -126,6 +126,65 @@ typedef struct my_GtkContainerClass_s
|
||||
void (*_gtk_reserved4) (void);
|
||||
} my_GtkContainerClass_t;
|
||||
|
||||
typedef struct my_GtkActionClass_s
|
||||
{
|
||||
my_GObjectClass_t parent_class;
|
||||
void (* activate) (void* action);
|
||||
int menu_item_type;
|
||||
int toolbar_item_type;
|
||||
void* (* create_menu_item) (void* action);
|
||||
void* (* create_tool_item) (void* action);
|
||||
void (* connect_proxy) (void* action, void* proxy);
|
||||
void (* disconnect_proxy) (void* action, void* proxy);
|
||||
void* (* create_menu) (void* action);
|
||||
void (*_gtk_reserved2) (void);
|
||||
void (*_gtk_reserved3) (void);
|
||||
void (*_gtk_reserved4) (void);
|
||||
} my_GtkActionClass_t;
|
||||
|
||||
typedef struct my_GtkMiscClass_s
|
||||
{
|
||||
my_GtkWidgetClass_t parent_class;
|
||||
} my_GtkMiscClass_t;
|
||||
|
||||
typedef struct my_GtkLabelClass_s
|
||||
{
|
||||
my_GtkMiscClass_t parent_class;
|
||||
void (* move_cursor) (void* label, int step, int count, int extend_selection);
|
||||
void (* copy_clipboard) (void* label);
|
||||
void (* populate_popup) (void* label, void* menu);
|
||||
int (*activate_link) (void* label, void* uri);
|
||||
void (*_gtk_reserved1) (void);
|
||||
void (*_gtk_reserved2) (void);
|
||||
void (*_gtk_reserved3) (void);
|
||||
} my_GtkLabelClass_t;
|
||||
|
||||
typedef struct my_GtkTreeViewClass_s
|
||||
{
|
||||
my_GtkContainerClass_t parent_class;
|
||||
void (* set_scroll_adjustments) (void* tree_view, void* hadjustment, void* vadjustment);
|
||||
void (* row_activated) (void* tree_view, void* path, void* column);
|
||||
int (* test_expand_row) (void* tree_view, void* iter, void* path);
|
||||
int (* test_collapse_row) (void* tree_view, void* iter, void* path);
|
||||
void (* row_expanded) (void* tree_view, void* iter, void* path);
|
||||
void (* row_collapsed) (void* tree_view, void* iter, void* path);
|
||||
void (* columns_changed) (void* tree_view);
|
||||
void (* cursor_changed) (void* tree_view);
|
||||
int (* move_cursor) (void* tree_view, int step, int count);
|
||||
int (* select_all) (void* tree_view);
|
||||
int (* unselect_all) (void* tree_view);
|
||||
int (* select_cursor_row) (void* tree_view, int start_editing);
|
||||
int (* toggle_cursor_row) (void* tree_view);
|
||||
int (* expand_collapse_cursor_row) (void* tree_view, int logical, int expand, int open_all);
|
||||
int (* select_cursor_parent) (void* tree_view);
|
||||
int (* start_interactive_search) (void* tree_view);
|
||||
void (*_gtk_reserved0) (void);
|
||||
void (*_gtk_reserved1) (void);
|
||||
void (*_gtk_reserved2) (void);
|
||||
void (*_gtk_reserved3) (void);
|
||||
void (*_gtk_reserved4) (void);
|
||||
} my_GtkTreeViewClass_t;
|
||||
|
||||
// GTypeValueTable
|
||||
typedef struct my_GTypeValueTable_s {
|
||||
void (*value_init) (void* value);
|
||||
@@ -180,13 +239,25 @@ my_GtkTypeInfo_t* findFreeGtkTypeInfo(my_GtkTypeInfo_t* fcts, int parent);
|
||||
void InitGTKClass(bridge_t *bridge);
|
||||
void FiniGTKClass();
|
||||
|
||||
void SetGObjectID(int id);
|
||||
void SetGTKObjectID(int id);
|
||||
void SetGTKWidgetID(int id);
|
||||
void SetGTKContainerID(int id);
|
||||
void SetGTypeName(void* f);
|
||||
#define GTKCLASSES() \
|
||||
GTKCLASS(GObject) \
|
||||
GTKCLASS(GtkObject) \
|
||||
GTKCLASS(GtkWidget) \
|
||||
GTKCLASS(GtkContainer) \
|
||||
GTKCLASS(GtkAction) \
|
||||
GTKCLASS(GtkLabel) \
|
||||
GTKCLASS(GtkMisc) \
|
||||
GTKCLASS(GtkTreeView) \
|
||||
|
||||
void* wrapCopyGTKClass(void* class, int type);
|
||||
#define GTKCLASS(A) void Set##A##ID(int id);
|
||||
GTKCLASSES()
|
||||
#undef GTKCLASS
|
||||
|
||||
void SetGTypeName(void* f);
|
||||
void AutoBridgeGtk(void*(*ref)(int), void(*unref)(void*));
|
||||
|
||||
void* wrapCopyGTKClass(void* cl, int type);
|
||||
void* unwrapCopyGTKClass(void* klass, int type);
|
||||
|
||||
void my_checkGlobalGdkDisplay();
|
||||
void my_setGlobalGThreadsInit();
|
||||
@@ -205,6 +276,7 @@ typedef struct my_signal_s {
|
||||
|
||||
my_signal_t* new_mysignal(void* f, void* data, void* destroy);
|
||||
void my_signal_delete(my_signal_t* sig);
|
||||
int my_signal_is_valid(void* sig);
|
||||
int my_signal_cb(void* a, void* b, void* c, void* d);
|
||||
|
||||
#endif //__GTKCLASS_H__
|
||||
@@ -84,6 +84,8 @@ GO("libpulse.so.0", pulse)
|
||||
GO("libsndfile.so.1", libsndfile)
|
||||
GO("libgtk-x11-2.0.so.0", gtkx112)
|
||||
GO("libgdk-x11-2.0.so.0", gdkx112)
|
||||
GO("libgtk-3.so.0", gtk3)
|
||||
GO("libgdk-3.so.0", gdk3)
|
||||
GO("libgdk_pixbuf-2.0.so.0", gdkpixbuf2)
|
||||
GO("libgio-2.0.so.0", gio2)
|
||||
GO("libgmodule-2.0.so.0", gmodule2)
|
||||
@@ -123,5 +125,8 @@ GO("libmpg123.so.0", mpg123)
|
||||
GO("libgnutls.so.30", gnutls)
|
||||
GO("libcups.so.2", libcups)
|
||||
GO("d3dadapter9.so.1", d3dadapter9)
|
||||
GO("libvulkan.so.1", vulkan)
|
||||
GO("libvulkan.so", vulkan)
|
||||
GO("libwayland-client.so.0", waylandclient)
|
||||
|
||||
GO("ld-linux.so.2", ldlinux)
|
||||
@@ -65,7 +65,9 @@ void myStackAlign(const char* fmt, uint32_t* st, uint32_t* mystack)
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
case '.': ++p; break; // formating, ignored
|
||||
case '.':
|
||||
case '+':
|
||||
case '-': ++p; break; // formating, ignored
|
||||
case 'm': state = 0; ++p; break; // no argument
|
||||
case 'n':
|
||||
case 'p':
|
||||
@@ -356,7 +358,9 @@ void myStackAlignW(const char* fmt, uint32_t* st, uint32_t* mystack)
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
case '.': ++p; break; // formating, ignored
|
||||
case '.':
|
||||
case '+':
|
||||
case '-': ++p; break; // formating, ignored
|
||||
case 'm': state = 0; ++p; break; // no argument
|
||||
case 'n':
|
||||
case 'p':
|
||||
|
||||
+141
-72
@@ -202,6 +202,15 @@ typedef struct i386_ucontext_s
|
||||
struct i386_xstate xstate;
|
||||
} i386_ucontext_t;
|
||||
|
||||
typedef struct i386_sigframe_s {
|
||||
uintptr_t pretcode; // pointer to retcode
|
||||
int sig;
|
||||
i386_mcontext_t cpustate;
|
||||
struct i386_xstate fpstate;
|
||||
uintptr_t extramask[64-1];
|
||||
char retcode[8];
|
||||
} i386_sigframe_t;
|
||||
|
||||
struct kernel_sigaction {
|
||||
void (*k_sa_handler) (int);
|
||||
unsigned long sa_flags;
|
||||
@@ -260,9 +269,9 @@ uint32_t RunFunctionHandler(int* exit, uintptr_t fnc, int nargs, ...)
|
||||
// trace_start = 0; trace_end = 1; // disabling trace, globably for now...
|
||||
|
||||
x86emu_t *emu = get_signal_emu();
|
||||
printf_log(LOG_DEBUG, "signal function handler %p called, ESP=%p\n", (void*)fnc, (void*)R_ESP);
|
||||
printf_log(LOG_DEBUG, "%04d|signal function handler %p called, ESP=%p\n", GetTID(), (void*)fnc, (void*)R_ESP);
|
||||
|
||||
SetFS(emu, default_fs);
|
||||
/*SetFS(emu, default_fs);*/
|
||||
for (int i=0; i<6; ++i)
|
||||
emu->segs_clean[i] = 0;
|
||||
|
||||
@@ -312,12 +321,11 @@ EXPORT int my_sigaltstack(x86emu_t* emu, const i386_stack_t* ss, i386_stack_t* o
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
printf_log(LOG_DEBUG, "sigaltstack called ss=%p[flags=0x%x, sp=%p, ss=0x%x], oss=%p\n", ss, ss->ss_flags, ss->ss_sp, ss->ss_size, oss);
|
||||
printf_log(LOG_DEBUG, "%04d|sigaltstack called ss=%p[flags=0x%x, sp=%p, ss=0x%x], oss=%p\n", GetTID(), ss, ss->ss_flags, ss->ss_sp, ss->ss_size, oss);
|
||||
if(ss->ss_flags && ss->ss_flags!=SS_DISABLE && ss->ss_flags!=SS_ONSTACK) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
//TODO: SS_ONSTACK is not correctly handled, has the stack is NOT the one where the signal came from
|
||||
|
||||
if(ss->ss_flags==SS_DISABLE) {
|
||||
if(new_ss)
|
||||
@@ -365,67 +373,115 @@ void my_sighandler(int32_t sig)
|
||||
RunFunctionHandler(&exits, restorer, 0);
|
||||
}
|
||||
|
||||
#ifdef DYNAREC
|
||||
uintptr_t getX86Address(dynablock_t* db, uintptr_t arm_addr)
|
||||
{
|
||||
uintptr_t x86addr = (uintptr_t)db->x86_addr;
|
||||
uintptr_t armaddr = (uintptr_t)db->block;
|
||||
int i = 0;
|
||||
do {
|
||||
int x86sz = 0;
|
||||
int armsz = 0;
|
||||
do {
|
||||
x86sz+=db->instsize[i].x86;
|
||||
armsz+=db->instsize[i].nat*4;
|
||||
}
|
||||
while(!db->instsize[++i].x86);
|
||||
if(arm_addr>=armaddr && arm_addr<(armaddr+armsz))
|
||||
return x86addr;
|
||||
armaddr+=armsz;
|
||||
x86addr+=x86sz;
|
||||
if(arm_addr==armaddr)
|
||||
return x86addr;
|
||||
} while(db->instsize[i].x86 || db->instsize[i].nat);
|
||||
return x86addr;
|
||||
}
|
||||
#endif
|
||||
|
||||
void my_sigactionhandler_oldpc(int32_t sig, siginfo_t* info, void * ucntx, void** old_pc)
|
||||
{
|
||||
// need to creat some x86_ucontext????
|
||||
// need to create some x86_ucontext????
|
||||
pthread_mutex_unlock(&my_context->mutex_trace); // just in case
|
||||
printf_log(LOG_DEBUG, "Sigactionhanlder for signal #%d called (jump to %p)\n", sig, (void*)my_context->signals[sig]);
|
||||
printf_log(LOG_DEBUG, "Sigactionhanlder for signal #%d called (jump to %p/%s)\n", sig, (void*)my_context->signals[sig], GetNativeName((void*)my_context->signals[sig]));
|
||||
uintptr_t restorer = my_context->restorer[sig];
|
||||
// try to fill some sigcontext....
|
||||
i386_ucontext_t sigcontext = {0};
|
||||
x86emu_t *emu = thread_get_emu(); // not good, emu is probably not up to date, especially using dynarec
|
||||
// stack traking
|
||||
x86emu_t *sigemu = get_signal_emu();
|
||||
i386_stack_t *new_ss = (i386_stack_t*)pthread_getspecific(sigstack_key);
|
||||
if(!new_ss) {
|
||||
sigcontext.uc_stack.ss_sp = sigemu->init_stack;
|
||||
sigcontext.uc_stack.ss_size = sigemu->size_stack;
|
||||
} else {
|
||||
sigcontext.uc_stack.ss_sp = new_ss->ss_sp;
|
||||
sigcontext.uc_stack.ss_size = new_ss->ss_size;
|
||||
}
|
||||
// get general register
|
||||
sigcontext.uc_mcontext.gregs[REG_EAX] = R_EAX;
|
||||
sigcontext.uc_mcontext.gregs[REG_ECX] = R_ECX;
|
||||
sigcontext.uc_mcontext.gregs[REG_EDX] = R_EDX;
|
||||
sigcontext.uc_mcontext.gregs[REG_EDI] = R_EDI;
|
||||
sigcontext.uc_mcontext.gregs[REG_ESI] = R_ESI;
|
||||
sigcontext.uc_mcontext.gregs[REG_EBP] = R_EBP;
|
||||
sigcontext.uc_mcontext.gregs[REG_EIP] = R_EIP;
|
||||
sigcontext.uc_mcontext.gregs[REG_ESP] = R_ESP+4;
|
||||
sigcontext.uc_mcontext.gregs[REG_EBX] = R_EBX;
|
||||
// flags
|
||||
sigcontext.uc_mcontext.gregs[REG_EFL] = emu->packed_eflags.x32;
|
||||
// get segments
|
||||
sigcontext.uc_mcontext.gregs[REG_GS] = R_GS;
|
||||
sigcontext.uc_mcontext.gregs[REG_FS] = R_FS;
|
||||
sigcontext.uc_mcontext.gregs[REG_ES] = R_ES;
|
||||
sigcontext.uc_mcontext.gregs[REG_DS] = R_DS;
|
||||
sigcontext.uc_mcontext.gregs[REG_CS] = R_CS;
|
||||
sigcontext.uc_mcontext.gregs[REG_SS] = R_SS;
|
||||
// get FloatPoint status
|
||||
sigcontext.uc_mcontext.fpregs = (i386_fpregset_t)&sigcontext.xstate;
|
||||
fpu_fxsave(emu, &sigcontext.xstate);
|
||||
// add custom SIGN in reserved area
|
||||
//((unsigned int *)(&sigcontext.xstate.fpstate.padding))[8*4+12] = 0x46505853; // not yet, when XSAVE / XRSTR will be ready
|
||||
// get signal mask
|
||||
// get actual register in case the signal was from inside a dynablock
|
||||
// get that actual ESP first!
|
||||
x86emu_t *emu = thread_get_emu();
|
||||
uint32_t *frame = (uint32_t*)R_ESP;
|
||||
#if defined(DYNAREC) && defined(__arm__)
|
||||
ucontext_t *p = (ucontext_t *)ucntx;
|
||||
void * pc = (void*)p->uc_mcontext.arm_pc;
|
||||
dynablock_t* db = FindDynablockFromNativeAddress(pc);
|
||||
if(db) {
|
||||
sigcontext.uc_mcontext.gregs[REG_EAX] = p->uc_mcontext.arm_r4;
|
||||
sigcontext.uc_mcontext.gregs[REG_ECX] = p->uc_mcontext.arm_r5;
|
||||
sigcontext.uc_mcontext.gregs[REG_EDX] = p->uc_mcontext.arm_r6;
|
||||
sigcontext.uc_mcontext.gregs[REG_EBX] = p->uc_mcontext.arm_r7;
|
||||
sigcontext.uc_mcontext.gregs[REG_ESP] = p->uc_mcontext.arm_r8+4;
|
||||
sigcontext.uc_mcontext.gregs[REG_EBP] = p->uc_mcontext.arm_r9;
|
||||
sigcontext.uc_mcontext.gregs[REG_ESI] = p->uc_mcontext.arm_r10;
|
||||
sigcontext.uc_mcontext.gregs[REG_EDI] = p->uc_mcontext.arm_fp;
|
||||
sigcontext.uc_mcontext.gregs[REG_EIP] = (uint32_t)db->x86_addr; // this is partly wrong...
|
||||
frame = (uint32_t*)p->uc_mcontext.arm_r8;
|
||||
}
|
||||
#endif
|
||||
// stack tracking
|
||||
x86emu_t *sigemu = get_signal_emu();
|
||||
i386_stack_t *new_ss = my_context->onstack[sig]?(i386_stack_t*)pthread_getspecific(sigstack_key):NULL;
|
||||
int used_stack = 0;
|
||||
if(new_ss) {
|
||||
if(new_ss->ss_flags == SS_ONSTACK) { // already using it!
|
||||
frame = (uint32_t*)sigemu->regs[_SP].dword[0];
|
||||
} else {
|
||||
frame = (uint32_t*)(((uintptr_t)new_ss->ss_sp + new_ss->ss_size - 16) & ~7);
|
||||
used_stack = 1;
|
||||
new_ss->ss_flags = SS_ONSTACK;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: do I need to really setup 2 stack frame? That doesn't seems right!
|
||||
// setup stack frame
|
||||
// try to fill some sigcontext....
|
||||
frame -= sizeof(i386_ucontext_t)/4;
|
||||
i386_ucontext_t *sigcontext = (i386_ucontext_t*)frame;
|
||||
// get general register
|
||||
sigcontext->uc_mcontext.gregs[REG_EAX] = R_EAX;
|
||||
sigcontext->uc_mcontext.gregs[REG_ECX] = R_ECX;
|
||||
sigcontext->uc_mcontext.gregs[REG_EDX] = R_EDX;
|
||||
sigcontext->uc_mcontext.gregs[REG_EDI] = R_EDI;
|
||||
sigcontext->uc_mcontext.gregs[REG_ESI] = R_ESI;
|
||||
sigcontext->uc_mcontext.gregs[REG_EBP] = R_EBP;
|
||||
sigcontext->uc_mcontext.gregs[REG_EIP] = R_EIP;
|
||||
sigcontext->uc_mcontext.gregs[REG_ESP] = R_ESP;
|
||||
sigcontext->uc_mcontext.gregs[REG_EBX] = R_EBX;
|
||||
// flags
|
||||
sigcontext->uc_mcontext.gregs[REG_EFL] = emu->packed_eflags.x32;
|
||||
// get segments
|
||||
sigcontext->uc_mcontext.gregs[REG_GS] = R_GS;
|
||||
sigcontext->uc_mcontext.gregs[REG_FS] = R_FS;
|
||||
sigcontext->uc_mcontext.gregs[REG_ES] = R_ES;
|
||||
sigcontext->uc_mcontext.gregs[REG_DS] = R_DS;
|
||||
sigcontext->uc_mcontext.gregs[REG_CS] = R_CS;
|
||||
sigcontext->uc_mcontext.gregs[REG_SS] = R_SS;
|
||||
#if defined(DYNAREC) && defined(__arm__)
|
||||
if(db) {
|
||||
sigcontext->uc_mcontext.gregs[REG_EAX] = p->uc_mcontext.arm_r4;
|
||||
sigcontext->uc_mcontext.gregs[REG_ECX] = p->uc_mcontext.arm_r5;
|
||||
sigcontext->uc_mcontext.gregs[REG_EDX] = p->uc_mcontext.arm_r6;
|
||||
sigcontext->uc_mcontext.gregs[REG_EBX] = p->uc_mcontext.arm_r7;
|
||||
sigcontext->uc_mcontext.gregs[REG_ESP] = p->uc_mcontext.arm_r8;
|
||||
sigcontext->uc_mcontext.gregs[REG_EBP] = p->uc_mcontext.arm_r9;
|
||||
sigcontext->uc_mcontext.gregs[REG_ESI] = p->uc_mcontext.arm_r10;
|
||||
sigcontext->uc_mcontext.gregs[REG_EDI] = p->uc_mcontext.arm_fp;
|
||||
sigcontext->uc_mcontext.gregs[REG_EIP] = getX86Address(db, (uintptr_t)pc);
|
||||
}
|
||||
#endif
|
||||
// get FloatPoint status
|
||||
sigcontext->uc_mcontext.fpregs = (i386_fpregset_t)&sigcontext->xstate;
|
||||
fpu_fxsave(emu, &sigcontext->xstate);
|
||||
// add custom SIGN in reserved area
|
||||
//((unsigned int *)(&sigcontext.xstate.fpstate.padding))[8*4+12] = 0x46505853; // not yet, when XSAVE / XRSTR will be ready
|
||||
// get signal mask
|
||||
|
||||
if(!new_ss) {
|
||||
sigcontext->uc_stack.ss_sp = sigemu->init_stack;
|
||||
sigcontext->uc_stack.ss_size = sigemu->size_stack;
|
||||
sigcontext->uc_stack.ss_flags = SS_DISABLE;
|
||||
} else {
|
||||
sigcontext->uc_stack.ss_sp = new_ss->ss_sp;
|
||||
sigcontext->uc_stack.ss_size = new_ss->ss_size;
|
||||
sigcontext->uc_stack.ss_flags = new_ss->ss_flags;
|
||||
}
|
||||
// Try to guess some REG_TRAPNO
|
||||
/*
|
||||
TRAP_x86_DIVIDE = 0, // Division by zero exception
|
||||
@@ -448,27 +504,33 @@ void my_sigactionhandler_oldpc(int32_t sig, siginfo_t* info, void * ucntx, void*
|
||||
TRAP_x86_MCHK = 18, // Machine check exception
|
||||
TRAP_x86_CACHEFLT = 19 // SIMD exception (via SIGFPE) if CPU is SSE capable otherwise Cache flush exception (via SIGSEV)
|
||||
*/
|
||||
intptr_t esp = (intptr_t)sigcontext.uc_mcontext.gregs[REG_ESP];
|
||||
|
||||
if(sig==SIGBUS)
|
||||
sigcontext.uc_mcontext.gregs[REG_TRAPNO] = 17;
|
||||
sigcontext->uc_mcontext.gregs[REG_TRAPNO] = 17;
|
||||
else if(sig==SIGSEGV) {
|
||||
sigcontext.uc_mcontext.gregs[REG_TRAPNO] = (info->si_code == SEGV_ACCERR)?((abs((intptr_t)info->si_addr-esp)<16)?12:14):13; // how to differenciate between a STACKFLT and a PAGEFAULT?
|
||||
sigcontext->uc_mcontext.gregs[REG_TRAPNO] =
|
||||
(info->si_code == SEGV_ACCERR)?((abs((intptr_t)info->si_addr-(intptr_t)sigcontext->uc_mcontext.gregs[REG_ESP])<16)?12:13):14; // how to differenciate between a STACKFLT and a PAGEFAULT?
|
||||
} else if(sig==SIGFPE)
|
||||
sigcontext.uc_mcontext.gregs[REG_TRAPNO] = 19;
|
||||
sigcontext->uc_mcontext.gregs[REG_TRAPNO] = 19;
|
||||
else if(sig==SIGILL)
|
||||
sigcontext.uc_mcontext.gregs[REG_TRAPNO] = 6;
|
||||
sigcontext->uc_mcontext.gregs[REG_TRAPNO] = 6;
|
||||
|
||||
// call the signal handler
|
||||
i386_ucontext_t sigcontext_copy = sigcontext;
|
||||
i386_ucontext_t sigcontext_copy = *sigcontext;
|
||||
|
||||
// set stack pointer
|
||||
sigemu->regs[_SP].dword[0] = (uintptr_t)frame;
|
||||
|
||||
// set segments
|
||||
memcpy(sigemu->segs, emu->segs, sizeof(sigemu->segs));
|
||||
|
||||
int exits = 0;
|
||||
int ret = RunFunctionHandler(&exits, my_context->signals[sig], 3, sig, info, &sigcontext);
|
||||
int ret = RunFunctionHandler(&exits, my_context->signals[sig], 3, sig, info, sigcontext);
|
||||
|
||||
if(memcmp(&sigcontext, &sigcontext_copy, sizeof(sigcontext))) {
|
||||
if(memcmp(sigcontext, &sigcontext_copy, sizeof(i386_ucontext_t))) {
|
||||
emu_jmpbuf_t* ejb = GetJmpBuf();
|
||||
if(ejb->jmpbuf_ok) {
|
||||
#define GO(R) if(sigcontext.uc_mcontext.gregs[REG_E##R]!=sigcontext_copy.uc_mcontext.gregs[REG_E##R]) ejb->emu->regs[_##R].dword[0]=sigcontext.uc_mcontext.gregs[REG_E##R]
|
||||
#define GO(R) if(sigcontext->uc_mcontext.gregs[REG_E##R]!=sigcontext_copy.uc_mcontext.gregs[REG_E##R]) ejb->emu->regs[_##R].dword[0]=sigcontext->uc_mcontext.gregs[REG_E##R]
|
||||
GO(AX);
|
||||
GO(CX);
|
||||
GO(DX);
|
||||
@@ -478,12 +540,12 @@ void my_sigactionhandler_oldpc(int32_t sig, siginfo_t* info, void * ucntx, void*
|
||||
GO(SP);
|
||||
GO(BX);
|
||||
#undef GO
|
||||
if(sigcontext.uc_mcontext.gregs[REG_EIP]!=sigcontext_copy.uc_mcontext.gregs[REG_EIP]) ejb->emu->ip.dword[0]=sigcontext.uc_mcontext.gregs[REG_EIP];
|
||||
sigcontext.uc_mcontext.gregs[REG_EIP] = R_EIP;
|
||||
if(sigcontext->uc_mcontext.gregs[REG_EIP]!=sigcontext_copy.uc_mcontext.gregs[REG_EIP]) ejb->emu->ip.dword[0]=sigcontext->uc_mcontext.gregs[REG_EIP];
|
||||
sigcontext->uc_mcontext.gregs[REG_EIP] = R_EIP;
|
||||
// flags
|
||||
if(sigcontext.uc_mcontext.gregs[REG_EFL]!=sigcontext_copy.uc_mcontext.gregs[REG_EFL]) ejb->emu->packed_eflags.x32=sigcontext.uc_mcontext.gregs[REG_EFL];
|
||||
if(sigcontext->uc_mcontext.gregs[REG_EFL]!=sigcontext_copy.uc_mcontext.gregs[REG_EFL]) ejb->emu->packed_eflags.x32=sigcontext->uc_mcontext.gregs[REG_EFL];
|
||||
// get segments
|
||||
#define GO(S) if(sigcontext.uc_mcontext.gregs[REG_##S]!=sigcontext_copy.uc_mcontext.gregs[REG_##S]) {ejb->emu->segs[_##S]=sigcontext.uc_mcontext.gregs[REG_##S]; ejb->emu->segs_clean[_##S] = 0;}
|
||||
#define GO(S) if(sigcontext->uc_mcontext.gregs[REG_##S]!=sigcontext_copy.uc_mcontext.gregs[REG_##S]) {ejb->emu->segs[_##S]=sigcontext->uc_mcontext.gregs[REG_##S]; ejb->emu->segs_clean[_##S] = 0;}
|
||||
GO(GS);
|
||||
GO(FS);
|
||||
GO(ES);
|
||||
@@ -494,15 +556,19 @@ void my_sigactionhandler_oldpc(int32_t sig, siginfo_t* info, void * ucntx, void*
|
||||
printf_log(LOG_DEBUG, "Context has been changed in Sigactionhanlder, doing longjmp to resume emu\n");
|
||||
if(old_pc)
|
||||
*old_pc = NULL; // re-init the value to allow another segfault at the same place
|
||||
if(used_stack) // release stack
|
||||
new_ss->ss_flags = 0;
|
||||
longjmp(ejb->jmpbuf, 1);
|
||||
}
|
||||
printf_log(LOG_INFO, "Warning, context has been changed in Sigactionhanlder%s\n", (sigcontext.uc_mcontext.gregs[REG_EIP]!=sigcontext_copy.uc_mcontext.gregs[REG_EIP])?" (EIP changed)":"");
|
||||
printf_log(LOG_INFO, "Warning, context has been changed in Sigactionhanlder%s\n", (sigcontext->uc_mcontext.gregs[REG_EIP]!=sigcontext_copy.uc_mcontext.gregs[REG_EIP])?" (EIP changed)":"");
|
||||
}
|
||||
printf_log(LOG_DEBUG, "Sigactionhanlder main function returned (exit=%d, restorer=%p)\n", exits, (void*)restorer);
|
||||
if(exits)
|
||||
exit(ret);
|
||||
if(restorer)
|
||||
RunFunctionHandler(&exits, restorer, 0);
|
||||
if(used_stack) // release stack
|
||||
new_ss->ss_flags = 0;
|
||||
}
|
||||
void my_box86signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
|
||||
{
|
||||
@@ -542,6 +608,7 @@ void my_box86signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
|
||||
static int old_code = -1;
|
||||
static void* old_pc = 0;
|
||||
static void* old_addr = 0;
|
||||
static int old_tid = 0;
|
||||
const char* signame = (sig==SIGSEGV)?"SIGSEGV":((sig==SIGBUS)?"SIGBUS":"SIGILL");
|
||||
if(old_code==info->si_code && old_pc==pc && old_addr==addr) {
|
||||
printf_log(LOG_NONE, "%04d|Double %s!\n", GetTID(), signame);
|
||||
@@ -559,13 +626,15 @@ void my_box86signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
|
||||
x86emu_t* emu = thread_get_emu();
|
||||
x86pc = R_EIP;
|
||||
esp = (void*)R_ESP;
|
||||
#if defined(__arm__) && defined(DYNAREC)
|
||||
#if defined(__arm__) && defined(DYNAREC)
|
||||
if(db && p->uc_mcontext.arm_r0>0x10000) {
|
||||
emu = (x86emu_t*)p->uc_mcontext.arm_r0;
|
||||
x86pc = (uintptr_t)db->x86_addr; // sadly, r12 is probably not actual eip, so use db info for now
|
||||
}
|
||||
if(db) {
|
||||
x86pc = getX86Address(db, (uintptr_t)pc);
|
||||
esp = (void*)p->uc_mcontext.arm_r8;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
x86name = getAddrFunctionName(x86pc);
|
||||
elfheader_t* elf = FindElfAddress(my_context, x86pc);
|
||||
if(elf)
|
||||
@@ -654,7 +723,6 @@ int EXPORT my_sigaction(x86emu_t* emu, int signum, const x86_sigaction_t *act, x
|
||||
|
||||
if(signum==SIGILL && emu->context->no_sigill)
|
||||
return 0;
|
||||
|
||||
struct sigaction newact = {0};
|
||||
struct sigaction old = {0};
|
||||
if(act) {
|
||||
@@ -676,6 +744,7 @@ int EXPORT my_sigaction(x86emu_t* emu, int signum, const x86_sigaction_t *act, x
|
||||
newact.sa_handler = act->_u._sa_handler;
|
||||
}
|
||||
my_context->restorer[signum] = (act->sa_flags&0x04000000)?(uintptr_t)act->sa_restorer:0;
|
||||
my_context->onstack[signum] = (act->sa_flags&SA_ONSTACK)?1:0;
|
||||
}
|
||||
int ret = 0;
|
||||
if(signum!=SIGSEGV && signum!=SIGBUS && signum!=SIGILL)
|
||||
|
||||
+10
-1
@@ -216,7 +216,16 @@ static void* pthread_routine(void* p)
|
||||
// call the function
|
||||
emuthread_t *et = (emuthread_t*)p;
|
||||
et->emu->type = EMUTYPE_MAIN;
|
||||
void* ret = (void*)RunFunctionWithEmu(et->emu, 0, et->fnc, 1, et->arg);
|
||||
// setup callstack and run...
|
||||
x86emu_t* emu = et->emu;
|
||||
R_ESP -= 4;
|
||||
uint32_t *sp = (uint32_t*)R_ESP;
|
||||
*sp = (uintptr_t)et->arg;
|
||||
PushExit(emu);
|
||||
R_EIP = et->fnc;
|
||||
DynaRun(et->emu);
|
||||
void* ret = (void*)R_EAX;
|
||||
//void* ret = (void*)RunFunctionWithEmu(et->emu, 0, et->fnc, 1, et->arg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,982 @@
|
||||
#undef _LARGEFILE_SOURCE
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <wchar.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <fts.h>
|
||||
|
||||
#include "x86emu.h"
|
||||
#include "emu/x86emu_private.h"
|
||||
#include "debug.h"
|
||||
#include "vkalign.h"
|
||||
|
||||
typedef enum VkStructureType {
|
||||
VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
|
||||
VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
|
||||
VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
|
||||
VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
|
||||
VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
|
||||
VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
|
||||
VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
|
||||
VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
|
||||
VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
|
||||
VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
|
||||
VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
|
||||
VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
|
||||
VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
|
||||
VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
|
||||
VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
|
||||
VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
|
||||
VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
|
||||
VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
|
||||
VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
|
||||
VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
|
||||
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
|
||||
VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
|
||||
VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
|
||||
VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
|
||||
VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
|
||||
VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
|
||||
VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
|
||||
VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
|
||||
VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
|
||||
VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
|
||||
VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
|
||||
VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,
|
||||
VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,
|
||||
VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,
|
||||
VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,
|
||||
VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
|
||||
VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,
|
||||
VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,
|
||||
VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,
|
||||
VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,
|
||||
VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,
|
||||
VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,
|
||||
VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,
|
||||
VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,
|
||||
VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,
|
||||
VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,
|
||||
VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,
|
||||
VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,
|
||||
VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = 1000120000,
|
||||
VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,
|
||||
VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,
|
||||
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,
|
||||
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,
|
||||
VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,
|
||||
VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,
|
||||
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
|
||||
VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,
|
||||
VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,
|
||||
VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = 1000063000,
|
||||
VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
|
||||
VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
|
||||
VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
|
||||
VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
|
||||
VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000,
|
||||
VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
|
||||
VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
|
||||
VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
|
||||
VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
|
||||
VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
|
||||
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
|
||||
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
|
||||
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002,
|
||||
VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
|
||||
VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
|
||||
VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
|
||||
VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
|
||||
VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
|
||||
VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
|
||||
VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
|
||||
VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001,
|
||||
VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000,
|
||||
VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001,
|
||||
VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002,
|
||||
VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003,
|
||||
VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000,
|
||||
VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001,
|
||||
VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR = 1000074002,
|
||||
VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000,
|
||||
VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000,
|
||||
VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001,
|
||||
VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002,
|
||||
VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003,
|
||||
VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000,
|
||||
VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
|
||||
VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001,
|
||||
VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = 1000082000,
|
||||
VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
|
||||
VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
|
||||
VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
|
||||
VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
|
||||
VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
|
||||
VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
|
||||
VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
|
||||
VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001,
|
||||
VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
|
||||
VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR = 1000109000,
|
||||
VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR = 1000109001,
|
||||
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR = 1000109002,
|
||||
VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR = 1000109003,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR = 1000109004,
|
||||
VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR = 1000109005,
|
||||
VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR = 1000109006,
|
||||
VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
|
||||
VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
|
||||
VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
|
||||
VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002,
|
||||
VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000,
|
||||
VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
|
||||
VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR = 1000121000,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR = 1000121003,
|
||||
VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004,
|
||||
VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
|
||||
VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001,
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT = 1000128002,
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003,
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004,
|
||||
VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000,
|
||||
VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001,
|
||||
VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002,
|
||||
VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003,
|
||||
VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000,
|
||||
VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = 1000138000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = 1000138001,
|
||||
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = 1000138002,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = 1000138003,
|
||||
VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003,
|
||||
VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004,
|
||||
VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000,
|
||||
VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000,
|
||||
VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002,
|
||||
VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003,
|
||||
VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004,
|
||||
VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005,
|
||||
VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000,
|
||||
VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = 1000161001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = 1000161002,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005,
|
||||
VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000,
|
||||
VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001,
|
||||
VK_STRUCTURE_TYPE_GEOMETRY_NV = 1000165003,
|
||||
VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV = 1000165004,
|
||||
VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV = 1000165005,
|
||||
VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006,
|
||||
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007,
|
||||
VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009,
|
||||
VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011,
|
||||
VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV = 1000165012,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001,
|
||||
VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000,
|
||||
VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000,
|
||||
VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000,
|
||||
VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000,
|
||||
VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = 1000196000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = 1000197000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000,
|
||||
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = 1000199001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = 1000201000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = 1000203000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002,
|
||||
VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV = 1000206000,
|
||||
VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000,
|
||||
VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT = 1000218001,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT = 1000218002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = 1000221000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000,
|
||||
VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = 1000244000,
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = 1000244001,
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002,
|
||||
VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = 1000246000,
|
||||
VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000,
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = 1000276000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2,
|
||||
VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2,
|
||||
VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
|
||||
VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2,
|
||||
VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2,
|
||||
VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO,
|
||||
VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO,
|
||||
VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO,
|
||||
VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES,
|
||||
VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS,
|
||||
VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
|
||||
VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2,
|
||||
VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2,
|
||||
VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2,
|
||||
VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
|
||||
VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2,
|
||||
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO,
|
||||
VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO,
|
||||
VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
|
||||
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO,
|
||||
VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT,
|
||||
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
|
||||
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
|
||||
VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkStructureType;
|
||||
|
||||
typedef struct my_vkhead_s {
|
||||
VkStructureType sType;
|
||||
struct my_vkhead_s* pNext;
|
||||
} my_vkhead_t;
|
||||
|
||||
typedef struct my_vksave_s {
|
||||
struct my_vksave_s* pNext;
|
||||
my_vkhead_t* pHead;
|
||||
} my_vksave_t;
|
||||
|
||||
typedef struct my_VkPipelineShaderStageCreateInfo_arm_t {
|
||||
VkStructureType sType;
|
||||
my_vkhead_t* pNext;
|
||||
int flags;
|
||||
int stage;
|
||||
uint64_t module;
|
||||
const char* pName;
|
||||
const void* pSpecializationInfo;
|
||||
} my_VkPipelineShaderStageCreateInfo_arm_t;
|
||||
|
||||
typedef struct my_VkPipelineShaderStageCreateInfo_x86_t {
|
||||
VkStructureType sType;
|
||||
my_vkhead_t* pNext;
|
||||
int flags;
|
||||
int stage;
|
||||
uint64_t module;
|
||||
const char* pName;
|
||||
const void* pSpecializationInfo;
|
||||
} __attribute__((packed)) my_VkPipelineShaderStageCreateInfo_x86_t;
|
||||
|
||||
typedef struct my_VkComputePipelineCreateInfo_arm_t {
|
||||
VkStructureType sType;
|
||||
const my_vkhead_t* pNext;
|
||||
int flags;
|
||||
my_VkPipelineShaderStageCreateInfo_arm_t stage;
|
||||
uint64_t layout;
|
||||
uint64_t basePipelineHandle;
|
||||
int32_t basePipelineIndex;
|
||||
} my_VkComputePipelineCreateInfo_arm_t;
|
||||
|
||||
typedef struct my_VkComputePipelineCreateInfo_x86_t {
|
||||
VkStructureType sType;
|
||||
const my_vkhead_t* pNext;
|
||||
int flags;
|
||||
my_VkPipelineShaderStageCreateInfo_x86_t stage;
|
||||
uint64_t layout;
|
||||
uint64_t basePipelineHandle;
|
||||
int32_t basePipelineIndex;
|
||||
} __attribute__((packed)) my_VkComputePipelineCreateInfo_x86_t;
|
||||
|
||||
#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
|
||||
#define VK_UUID_SIZE 16
|
||||
|
||||
#define NOCHANGE\
|
||||
case VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO: \
|
||||
case VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO: \
|
||||
case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: \
|
||||
case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: \
|
||||
case VK_STRUCTURE_TYPE_MEMORY_BARRIER: \
|
||||
case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER: \
|
||||
case VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_EVENT_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_FENCE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE: \
|
||||
case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO: \
|
||||
case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO: \
|
||||
case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2: \
|
||||
case VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2:\
|
||||
case VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2: \
|
||||
case VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO: \
|
||||
case VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: \
|
||||
case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2: \
|
||||
case VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2: \
|
||||
case VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR: \
|
||||
case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR: \
|
||||
case VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR: \
|
||||
case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR: \
|
||||
case VK_STRUCTURE_TYPE_PRESENT_INFO_KHR: \
|
||||
case VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR: \
|
||||
case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT: \
|
||||
case VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT: \
|
||||
case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: \
|
||||
case VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: \
|
||||
case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: \
|
||||
case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: \
|
||||
case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR: \
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT:\
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT:\
|
||||
case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO: \
|
||||
|
||||
#define CH(C, B, A) \
|
||||
case C: \
|
||||
s = B; \
|
||||
A; \
|
||||
break;
|
||||
|
||||
#define CHANGE(A, B) \
|
||||
CH(VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, "upiUiiup", A) \
|
||||
CH(VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO, "upiUiUU",A) \
|
||||
CH(VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,"upiiiiuuUiuuuu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, "upiUupuuu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, "upiuppppppppppUUuUi", A) \
|
||||
CH(VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, "upiUiiiiiiiuuuu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_SUBMIT_INFO, "upuppupup", A) \
|
||||
CH(VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, "upUuuuippp", A) \
|
||||
CH(VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET, "upUuuUuuu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, "upSUUu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, "up" \
|
||||
"uuuuiYB" \
|
||||
"SuuuuuuuuuuuUUuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuffuuuffuLUUUiuiuffuuuuiiiiuiiiiiuifuuuuffffffiiUUU"\
|
||||
"iiiii",A) \
|
||||
CH(VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR, "upipu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, "upipu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR, "upUUUUu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, "upiUuiiuuuiiupiiiiU", A) \
|
||||
CH(VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR, "upiiuuifiuu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT, "upUUi", A) \
|
||||
CH(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, "upUu", A) \
|
||||
CH(VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, "upiupiUiUu", A) \
|
||||
case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO: \
|
||||
B##VkComputePipelineCreateInfo(src, &dst); \
|
||||
break; \
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
//--------- TOOLS --------
|
||||
//--------------------------------------------------------------
|
||||
static void checkVkComputePipelineCreateInfo(const char** src, int* dst)
|
||||
{
|
||||
*dst = 1;
|
||||
}
|
||||
static int needAlign(my_vkhead_t* x86)
|
||||
{
|
||||
const char* s;
|
||||
const char** src = &s;
|
||||
int dst = 0;
|
||||
while(x86) {
|
||||
switch(x86->sType) {
|
||||
NOCHANGE
|
||||
break;
|
||||
CHANGE(return 1, check)
|
||||
default:
|
||||
printf_log(LOG_INFO, "BOX86: Warning, unknown Vulkan Type %d in needAlign function\n", x86->sType);
|
||||
return 0;
|
||||
}
|
||||
if(dst) return dst;
|
||||
x86 = x86->pNext;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static my_vksave_t* saveVk(my_vkhead_t* src)
|
||||
{
|
||||
if(!src)
|
||||
return NULL;
|
||||
my_vksave_t* ret = malloc(sizeof(my_vksave_t));
|
||||
ret->pHead = src;
|
||||
ret->pNext = saveVk(src->pNext);
|
||||
return ret;
|
||||
}
|
||||
static void freeVk(my_vksave_t* save)
|
||||
{
|
||||
if(!save)
|
||||
return;
|
||||
freeVk(save->pNext);
|
||||
free(save);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
//--------- ALIGN x86 -> ARM --------
|
||||
//--------------------------------------------------------------
|
||||
static void alignVkComputePipelineCreateInfo(my_vkhead_t* src, my_vkhead_t** dst)
|
||||
{
|
||||
my_VkComputePipelineCreateInfo_arm_t* vkdst = (my_VkComputePipelineCreateInfo_arm_t*)malloc(sizeof(my_VkPipelineShaderStageCreateInfo_arm_t));
|
||||
my_VkComputePipelineCreateInfo_x86_t* vksrc = (my_VkComputePipelineCreateInfo_x86_t*)src;
|
||||
vkdst->sType = vksrc->sType;
|
||||
vkdst->pNext = vksrc->pNext;
|
||||
vkdst->flags = vksrc->flags;
|
||||
vkdst->stage.sType = vksrc->stage.sType;
|
||||
vkdst->stage.pNext = vksrc->stage.pNext;
|
||||
vkdst->stage.flags = vksrc->stage.flags;
|
||||
vkdst->stage.stage = vksrc->stage.stage;
|
||||
vkdst->stage.module = vksrc->stage.module;
|
||||
vkdst->stage.pName = vksrc->stage.pName;
|
||||
vkdst->stage.pSpecializationInfo = vksrc->stage.pSpecializationInfo;
|
||||
vkdst->layout = vksrc->layout;
|
||||
vkdst->basePipelineHandle = vksrc->basePipelineHandle;
|
||||
vkdst->basePipelineIndex = vksrc->basePipelineIndex;
|
||||
}
|
||||
|
||||
int vkalignSize(const char* desc)
|
||||
{
|
||||
int c = 0;
|
||||
int sz = 0;
|
||||
int a = 0;
|
||||
while(*desc) {
|
||||
switch (*desc) {
|
||||
case 'i':
|
||||
case 'u':
|
||||
case 'p':
|
||||
case 'l':
|
||||
case 'L':
|
||||
case 'f':
|
||||
++c;
|
||||
sz+=4;
|
||||
break;
|
||||
case 'S': // start of a struct inside struct. Just align, no copy
|
||||
if(c&1) {
|
||||
++c;
|
||||
sz+=4;
|
||||
}
|
||||
break;
|
||||
case 'B': // 16char, no alignement required
|
||||
c+=4;
|
||||
sz+=16;
|
||||
break;
|
||||
case 'Y': //256char, no aligment requires
|
||||
c+=64;
|
||||
sz+=256;
|
||||
break;
|
||||
case 'U':
|
||||
case 'I':
|
||||
case 'd':
|
||||
if(c&1) { //align?
|
||||
++c;
|
||||
sz+=4;
|
||||
}
|
||||
a=1;
|
||||
sz+=8;
|
||||
c+=2;
|
||||
break;
|
||||
default:
|
||||
printf_log(LOG_NONE, "BOX86: Warning, '%c' not handled in vkalignSize!\n", *desc);
|
||||
}
|
||||
++desc;
|
||||
}
|
||||
if(a && (c&1)) { //align?
|
||||
++c;
|
||||
sz+=4;
|
||||
}
|
||||
return sz;
|
||||
}
|
||||
|
||||
void* vkalignStruct(void* src, const char* desc, int cnt)
|
||||
{
|
||||
int sz = vkalignSize(desc);
|
||||
int count=(cnt)?cnt:1;
|
||||
void* dst = (void*)malloc(sz*count);
|
||||
int c = 0;
|
||||
int a = 0;
|
||||
uint32_t* psrc = (uint32_t*)src;
|
||||
uint32_t* pdst = (uint32_t*)dst;
|
||||
while(count) {
|
||||
const char* p = desc;
|
||||
while(*p) {
|
||||
switch (*p) {
|
||||
case 'i':
|
||||
case 'u':
|
||||
case 'p':
|
||||
case 'l':
|
||||
case 'L':
|
||||
case 'f':
|
||||
++c;
|
||||
*(pdst++) = *(psrc++);
|
||||
break;
|
||||
case 'S': // start of a struct inside struct. Just align, no copy
|
||||
if(c&1) { //align?
|
||||
++c;
|
||||
*(pdst++) = 0;
|
||||
}
|
||||
break;
|
||||
case 'B': // 16char, no alignement required
|
||||
c+=4;
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
break;
|
||||
case 'Y': //256char, no aligment requires
|
||||
c+=64;
|
||||
memcpy(pdst, psrc, 256);
|
||||
pdst+=64;
|
||||
psrc+=64;
|
||||
break;
|
||||
case 'U':
|
||||
case 'I':
|
||||
case 'd':
|
||||
if(c&1) { //align?
|
||||
++c;
|
||||
*(pdst++) = 0;
|
||||
}
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
c+=2;
|
||||
a=1;
|
||||
break;
|
||||
}
|
||||
++p;
|
||||
}
|
||||
if(a && (c&1)) {
|
||||
++c;
|
||||
++pdst;
|
||||
}
|
||||
--count;
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
static my_vkhead_t* alignFromx86(my_vkhead_t* src)
|
||||
{
|
||||
if(!src)
|
||||
return src;
|
||||
my_vkhead_t *dst = src;
|
||||
const char* s;
|
||||
switch(src->sType) {
|
||||
NOCHANGE
|
||||
// no need to align...
|
||||
break;
|
||||
CHANGE(dst=vkalignStruct(src, s, 0), align)
|
||||
default:
|
||||
// unknow
|
||||
printf_log(LOG_INFO, "BOX86: Warning, unknown Vulkan structure type %d\n", src->sType);
|
||||
}
|
||||
dst->pNext = alignFromx86(src->pNext);
|
||||
return dst;
|
||||
}
|
||||
|
||||
void* VulkanFromx86(void* src, void** save)
|
||||
{
|
||||
if(!src)
|
||||
return src;
|
||||
if(!needAlign(src))
|
||||
return src;
|
||||
*save = saveVk(src);
|
||||
return alignFromx86(src);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
//--------- UNALIGN ARM -> x86 --------
|
||||
//--------------------------------------------------------------
|
||||
static void unalignVkComputePipelineCreateInfo(my_vkhead_t* src, my_vkhead_t** dst)
|
||||
{
|
||||
my_VkComputePipelineCreateInfo_x86_t* vkdst = (my_VkComputePipelineCreateInfo_x86_t*)*dst;
|
||||
my_VkComputePipelineCreateInfo_arm_t* vksrc = (my_VkComputePipelineCreateInfo_arm_t*)src;
|
||||
vkdst->sType = vksrc->sType;
|
||||
vkdst->pNext = vksrc->pNext;
|
||||
vkdst->flags = vksrc->flags;
|
||||
vkdst->stage.sType = vksrc->stage.sType;
|
||||
vkdst->stage.pNext = vksrc->stage.pNext;
|
||||
vkdst->stage.flags = vksrc->stage.flags;
|
||||
vkdst->stage.stage = vksrc->stage.stage;
|
||||
vkdst->stage.module = vksrc->stage.module;
|
||||
vkdst->stage.pName = vksrc->stage.pName;
|
||||
vkdst->stage.pSpecializationInfo = vksrc->stage.pSpecializationInfo;
|
||||
vkdst->layout = vksrc->layout;
|
||||
vkdst->basePipelineHandle = vksrc->basePipelineHandle;
|
||||
vkdst->basePipelineIndex = vksrc->basePipelineIndex;
|
||||
|
||||
free(src);
|
||||
}
|
||||
|
||||
void vkunalignStruct(void* dst, void* src, const char* desc, int cnt)
|
||||
{
|
||||
int c = 0;
|
||||
int a = 1;
|
||||
uint32_t* psrc = (uint32_t*)src;
|
||||
uint32_t* pdst = (uint32_t*)dst;
|
||||
int count = (cnt)?cnt:1;
|
||||
while(count) {
|
||||
const char* p = desc;
|
||||
while(*p) {
|
||||
switch (*p) {
|
||||
case 'i':
|
||||
case 'u':
|
||||
case 'p':
|
||||
case 'f':
|
||||
case 'l':
|
||||
case 'L':
|
||||
++c;
|
||||
*(pdst++) = *(psrc++);
|
||||
break;
|
||||
case 'S': // start of a struct inside struct. Just align, no copy
|
||||
if(c&1) { //align?
|
||||
++c;
|
||||
++psrc;
|
||||
}
|
||||
break;
|
||||
case 'B': // 16char, no alignement required
|
||||
c+=4;
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
break;
|
||||
case 'Y': //256char, no aligment requires
|
||||
c+=64;
|
||||
memcpy(pdst, psrc, 256);
|
||||
pdst+=64;
|
||||
psrc+=64;
|
||||
break;
|
||||
case 'U':
|
||||
case 'I':
|
||||
case 'd':
|
||||
if(c&1) { //align?
|
||||
++c;
|
||||
++psrc;
|
||||
}
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
c+=2;
|
||||
a=1;
|
||||
break;
|
||||
}
|
||||
++p;
|
||||
}
|
||||
--count;
|
||||
if(a && (c&1)) { //align?
|
||||
++c;
|
||||
++psrc;
|
||||
}
|
||||
}
|
||||
free(src);
|
||||
}
|
||||
|
||||
int vkunalignSize(const char* desc)
|
||||
{
|
||||
int sz = 0;
|
||||
while(*desc) {
|
||||
switch (*desc) {
|
||||
case 'i':
|
||||
case 'u':
|
||||
case 'p':
|
||||
case 'l':
|
||||
case 'L':
|
||||
case 'f':
|
||||
sz+=4;
|
||||
break;
|
||||
case 'S': // start of a struct inside struct. Just align, no copy
|
||||
break;
|
||||
case 'B': // 16char, no alignement required
|
||||
sz+=16;
|
||||
break;
|
||||
case 'Y': //256char, no aligment requires
|
||||
sz+=256;
|
||||
break;
|
||||
case 'U':
|
||||
case 'I':
|
||||
case 'd':
|
||||
sz+=8;
|
||||
break;
|
||||
default:
|
||||
printf_log(LOG_NONE, "BOX86: Warning, '%c' not handled in vkunalignSize!\n", *desc);
|
||||
}
|
||||
++desc;
|
||||
}
|
||||
return sz;
|
||||
}
|
||||
|
||||
void* vkStructUnalign(void* src, const char* desc, int cnt)
|
||||
{
|
||||
int sz = vkunalignSize(desc);
|
||||
int count=cnt;
|
||||
if(!cnt && !src)
|
||||
return src;
|
||||
void* dst = (void*)malloc(sz*count);
|
||||
int c = 0;
|
||||
int a = 1;
|
||||
uint32_t* psrc = (uint32_t*)src;
|
||||
uint32_t* pdst = (uint32_t*)dst;
|
||||
while(count) {
|
||||
const char* p = desc;
|
||||
while(*p) {
|
||||
switch (*p) {
|
||||
case 'i':
|
||||
case 'u':
|
||||
case 'p':
|
||||
case 'f':
|
||||
case 'l':
|
||||
case 'L':
|
||||
++c;
|
||||
*(pdst++) = *(psrc++);
|
||||
break;
|
||||
case 'S': // start of a struct inside struct. Just align, no copy
|
||||
if(c&1) { //align?
|
||||
++c;
|
||||
++psrc;
|
||||
}
|
||||
break;
|
||||
case 'B': // 16char, no alignement required
|
||||
c+=4;
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
break;
|
||||
case 'Y': //256char, no aligment requires
|
||||
c+=64;
|
||||
memcpy(pdst, psrc, 256);
|
||||
pdst+=64;
|
||||
psrc+=64;
|
||||
break;
|
||||
case 'U':
|
||||
case 'I':
|
||||
case 'd':
|
||||
if(c&1) { //align?
|
||||
++c;
|
||||
++psrc;
|
||||
}
|
||||
*(pdst++) = *(psrc++);
|
||||
*(pdst++) = *(psrc++);
|
||||
c+=2;
|
||||
a=1;
|
||||
break;
|
||||
}
|
||||
++p;
|
||||
}
|
||||
--count;
|
||||
if(a && (c&1)) { //align?
|
||||
++c;
|
||||
++psrc;
|
||||
}
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
static void unalignFromx86(my_vkhead_t* src, my_vksave_t* vksave)
|
||||
{
|
||||
my_vkhead_t* dst = vksave->pHead;
|
||||
while(src) {
|
||||
my_vkhead_t* nextsrc = src->pNext;
|
||||
const char* s;
|
||||
switch(src->sType) {
|
||||
NOCHANGE
|
||||
// no need to unalign...
|
||||
break;
|
||||
CHANGE(vkunalignStruct(dst, src, s, 0), unalign)
|
||||
default:
|
||||
break;// unknown
|
||||
}
|
||||
vksave = vksave->pNext;
|
||||
dst->pNext = vksave?vksave->pHead:NULL;
|
||||
dst = dst->pNext;
|
||||
src = nextsrc;
|
||||
}
|
||||
}
|
||||
|
||||
void VulkanTox86(void* src, void* save)
|
||||
{
|
||||
if(!src || !save)
|
||||
return;
|
||||
my_vkhead_t* vksrc = (my_vkhead_t*)src;
|
||||
my_vksave_t* vksave = (my_vksave_t*)save;
|
||||
unalignFromx86(vksrc, vksave);
|
||||
freeVk(save);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#include <stdint.h>
|
||||
|
||||
void* VulkanFromx86(void* src, void** save);
|
||||
void VulkanTox86(void* src, void* save);
|
||||
|
||||
int vkalignSize(const char* desc);
|
||||
void* vkalignStruct(void* src, const char* desc, int cnt);
|
||||
void vkunalignStruct(void* dst, void* src, const char* desc, int cnt);
|
||||
void* vkStructUnalign(void* src, const char* desc, int cnt);
|
||||
+13
-7
@@ -81,7 +81,7 @@ uintptr_t trace_start = 0, trace_end = 0;
|
||||
char* trace_func = NULL;
|
||||
uintptr_t fmod_smc_start = 0;
|
||||
uintptr_t fmod_smc_end = 0;
|
||||
uint16_t default_fs = 0;
|
||||
uint32_t default_fs = 0;
|
||||
int jit_gdb = 0;
|
||||
|
||||
FILE* ftrace = NULL;
|
||||
@@ -737,9 +737,10 @@ static void free_contextargv()
|
||||
free(my_context->argv[i]);
|
||||
}
|
||||
|
||||
const char **environ __attribute__((weak)) = NULL;
|
||||
int main(int argc, const char **argv, const char **env) {
|
||||
|
||||
init_auxval(argc, argv, env);
|
||||
init_auxval(argc, argv, environ?environ:env);
|
||||
// trying to open and load 1st arg
|
||||
if(argc==1) {
|
||||
PrintBox86Version();
|
||||
@@ -793,6 +794,11 @@ int main(int argc, const char **argv, const char **env) {
|
||||
const char* prereserve = getenv("WINEPRELOADRESERVE");
|
||||
printf_log(LOG_INFO, "BOX86: Wine detected, WINEPRELOADRESERVE=\"%s\"\n", prereserve?prereserve:"");
|
||||
wine_prereserve(prereserve);
|
||||
// special case for winedbg, doesn't work anyway
|
||||
if(argv[nextarg+1] && strstr(argv[nextarg+1], "winedbg")==argv[nextarg+1]) {
|
||||
printf_log(LOG_NONE, "winedbg detected, not launching it!\n");
|
||||
exit(0); // exiting, it doesn't work anyway
|
||||
}
|
||||
}
|
||||
// Create a new context
|
||||
my_context = NewBox86Context(argc - nextarg);
|
||||
@@ -805,11 +811,11 @@ int main(int argc, const char **argv, const char **env) {
|
||||
else
|
||||
my_context->box86path = ResolveFile(argv[0], &my_context->box86_path);
|
||||
// prepare all other env. var
|
||||
my_context->envc = CountEnv(env);
|
||||
my_context->envc = CountEnv(environ?environ:env);
|
||||
printf_log(LOG_INFO, "Counted %d Env var\n", my_context->envc);
|
||||
// allocate extra space for new environment variables such as BOX86_PATH
|
||||
my_context->envv = (char**)calloc(my_context->envc+4, sizeof(char*));
|
||||
GatherEnv(&my_context->envv, env, my_context->box86path);
|
||||
GatherEnv(&my_context->envv, environ?environ:env, my_context->box86path);
|
||||
if(box86_log>=LOG_DUMP) {
|
||||
for (int i=0; i<my_context->envc; ++i)
|
||||
printf_log(LOG_DUMP, " Env[%02d]: %s\n", i, my_context->envv[i]);
|
||||
@@ -908,12 +914,12 @@ int main(int argc, const char **argv, const char **env) {
|
||||
}
|
||||
elfheader_t *elf_header = LoadAndCheckElfHeader(f, my_context->argv[0], 1);
|
||||
if(!elf_header) {
|
||||
printf_log(LOG_NONE, "Error: reading elf header of %s\n", my_context->argv[0]);
|
||||
printf_log(LOG_NONE, "Error: reading elf header of %s, try to launch natively instead\n", my_context->argv[0]);
|
||||
fclose(f);
|
||||
free_contextargv();
|
||||
FreeBox86Context(&my_context);
|
||||
FreeCollection(&ld_preload);
|
||||
return -1;
|
||||
return execvp(argv[1], (char * const*)(argv+1));
|
||||
}
|
||||
AddElfHeader(my_context, elf_header);
|
||||
|
||||
@@ -1011,7 +1017,7 @@ int main(int argc, const char **argv, const char **env) {
|
||||
setupTrace(my_context);
|
||||
// get entrypoint
|
||||
my_context->ep = GetEntryPoint(my_context->maplib, elf_header);
|
||||
#ifdef RPI
|
||||
#if defined(RPI) || defined(RK3399)
|
||||
// before launching emulation, let's check if this is a mojosetup from GOG
|
||||
if (((strstr(prog, "bin/linux/x86/mojosetup") && getenv("MOJOSETUP_BASE")) || strstr(prog, ".mojosetup/mojosetup"))
|
||||
&& getenv("GTK2_RC_FILES")) {
|
||||
|
||||
+84
-2
@@ -1,11 +1,17 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "bridge.h"
|
||||
#include "bridge_private.h"
|
||||
#include "wrapper.h"
|
||||
#include "khash.h"
|
||||
#include "debug.h"
|
||||
#ifdef DYNAREC
|
||||
#include "dynablock.h"
|
||||
#endif
|
||||
|
||||
KHASH_MAP_INIT_INT(bridgemap, uintptr_t)
|
||||
|
||||
@@ -87,9 +93,46 @@ uintptr_t AddCheckBridge(bridge_t* bridge, wrapper_t w, void* fnc, int N)
|
||||
return ret;
|
||||
}
|
||||
|
||||
uintptr_t AddAutomaticBridge(x86emu_t* emu, bridge_t* bridge, wrapper_t w, void* fnc, int N)
|
||||
{
|
||||
if(!fnc)
|
||||
return 0;
|
||||
uintptr_t ret = CheckBridged(bridge, fnc);
|
||||
if(!ret)
|
||||
ret = AddBridge(bridge, w, fnc, N);
|
||||
if(!hasAlternate(fnc)) {
|
||||
printf_log(LOG_DEBUG, "Adding AutomaticBridge for %p to %p\n", fnc, (void*)ret);
|
||||
addAlternate(fnc, (void*)ret);
|
||||
#ifdef DYNAREC
|
||||
// now, check if dynablock at native address exist
|
||||
DBAlternateBlock(emu, (uintptr_t)fnc, ret);
|
||||
#endif
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void* GetNativeFnc(uintptr_t fnc)
|
||||
{
|
||||
if(!fnc) return NULL;
|
||||
// check if function exist in some loaded lib
|
||||
Dl_info info;
|
||||
if(dladdr((void*)fnc, &info))
|
||||
return (void*)fnc;
|
||||
// check if it's an indirect jump
|
||||
#define PK(a) *(uint8_t*)(fnc+a)
|
||||
#define PK32(a) *(uint32_t*)(fnc+a)
|
||||
if(PK(0)==0xff && PK(1)==0x25) { // absolute jump, maybe the GOT
|
||||
uintptr_t a1 = (PK32(2)); // need to add a check to see if the address is from the GOT !
|
||||
a1 = *(uintptr_t*)a1;
|
||||
if(a1 && a1>0x10000) {
|
||||
a1 = (uintptr_t)GetNativeFnc(a1);
|
||||
if(a1)
|
||||
return (void*)a1;
|
||||
}
|
||||
}
|
||||
#undef PK
|
||||
#undef PK32
|
||||
// check if bridge exist
|
||||
onebridge_t *b = (onebridge_t*)fnc;
|
||||
if(b->CC != 0xCC || b->S!='S' || b->C!='C' || (b->C3!=0xC3 && b->C3!=0xC2))
|
||||
return NULL; // not a bridge?!
|
||||
@@ -102,4 +145,43 @@ void* GetNativeFncOrFnc(uintptr_t fnc)
|
||||
if(b->CC != 0xCC || b->S!='S' || b->C!='C' || (b->C3!=0xC3 && b->C3!=0xC2))
|
||||
return (void*)fnc; // not a bridge?!
|
||||
return (void*)b->f;
|
||||
}
|
||||
}
|
||||
|
||||
// Alternate address handling
|
||||
KHASH_MAP_INIT_INT(alternate, void*)
|
||||
static kh_alternate_t *my_alternates = NULL;
|
||||
|
||||
int hasAlternate(void* addr) {
|
||||
if(!my_alternates)
|
||||
return 0;
|
||||
khint_t k = kh_get(alternate, my_alternates, (uintptr_t)addr);
|
||||
if(k==kh_end(my_alternates))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void* getAlternate(void* addr) {
|
||||
if(!my_alternates)
|
||||
return addr;
|
||||
khint_t k = kh_get(alternate, my_alternates, (uintptr_t)addr);
|
||||
if(k!=kh_end(my_alternates))
|
||||
return kh_value(my_alternates, k);
|
||||
return addr;
|
||||
}
|
||||
void addAlternate(void* addr, void* alt) {
|
||||
if(!my_alternates) {
|
||||
my_alternates = kh_init(alternate);
|
||||
}
|
||||
int ret;
|
||||
khint_t k = kh_put(alternate, my_alternates, (uintptr_t)addr, &ret);
|
||||
if(!ret) // already there
|
||||
return;
|
||||
kh_value(my_alternates, k) = alt;
|
||||
}
|
||||
|
||||
void cleanAlternate() {
|
||||
if(my_alternates) {
|
||||
kh_destroy(alternate, my_alternates);
|
||||
my_alternates = NULL;
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ int FileIsX86ELF(const char* filename)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef RPI
|
||||
#if defined(RPI) || defined(RK3399)
|
||||
void sanitize_mojosetup_gtk_background()
|
||||
{
|
||||
// get GTK2_RC_FILES folder
|
||||
|
||||
+530
-237
@@ -14,14 +14,17 @@
|
||||
#include "librarian.h"
|
||||
#include "gtkclass.h"
|
||||
#include "library.h"
|
||||
|
||||
#include "khash.h"
|
||||
|
||||
static bridge_t* my_bridge = NULL;
|
||||
static int my_gobject = -1;
|
||||
static int my_gtkobject = -1;
|
||||
static int my_gtkwidget = -1;
|
||||
static int my_gtkcontainer = -1;
|
||||
static const char* (*g_type_name)(int) = NULL;
|
||||
#define GTKCLASS(A) static int my_##A = -1;
|
||||
GTKCLASSES()
|
||||
#undef GTKCLASS
|
||||
|
||||
KHASH_SET_INIT_INT(signalmap)
|
||||
static kh_signalmap_t *my_signalmap = NULL;
|
||||
|
||||
// ---- Defining the multiple functions now -----
|
||||
#define SUPER() \
|
||||
GO(0) \
|
||||
@@ -41,51 +44,83 @@ static RET my_##NAME##_##A DEF \
|
||||
return (RET)RunFunction(my_context, my_##NAME##_fct_##A, N, __VA_ARGS__);\
|
||||
}
|
||||
|
||||
#define FIND(NAME) \
|
||||
static void* find_##NAME(void* fct) \
|
||||
{ \
|
||||
if(!fct) return fct; \
|
||||
if(my_##NAME##_fct_0 == (uintptr_t)fct) return my_##NAME##_0; \
|
||||
if(my_##NAME##_fct_1 == (uintptr_t)fct) return my_##NAME##_1; \
|
||||
if(my_##NAME##_fct_2 == (uintptr_t)fct) return my_##NAME##_2; \
|
||||
if(my_##NAME##_fct_3 == (uintptr_t)fct) return my_##NAME##_3; \
|
||||
if(my_##NAME##_fct_4 == (uintptr_t)fct) return my_##NAME##_4; \
|
||||
if(my_##NAME##_fct_5 == (uintptr_t)fct) return my_##NAME##_5; \
|
||||
if(my_##NAME##_fct_6 == (uintptr_t)fct) return my_##NAME##_6; \
|
||||
if(my_##NAME##_fct_7 == (uintptr_t)fct) return my_##NAME##_7; \
|
||||
if(my_##NAME##_fct_0 == 0) {my_##NAME##_fct_0 = (uintptr_t)fct; return my_##NAME##_0; } \
|
||||
if(my_##NAME##_fct_1 == 0) {my_##NAME##_fct_1 = (uintptr_t)fct; return my_##NAME##_1; } \
|
||||
if(my_##NAME##_fct_2 == 0) {my_##NAME##_fct_2 = (uintptr_t)fct; return my_##NAME##_2; } \
|
||||
if(my_##NAME##_fct_3 == 0) {my_##NAME##_fct_3 = (uintptr_t)fct; return my_##NAME##_3; } \
|
||||
if(my_##NAME##_fct_4 == 0) {my_##NAME##_fct_4 = (uintptr_t)fct; return my_##NAME##_4; } \
|
||||
if(my_##NAME##_fct_5 == 0) {my_##NAME##_fct_5 = (uintptr_t)fct; return my_##NAME##_5; } \
|
||||
if(my_##NAME##_fct_6 == 0) {my_##NAME##_fct_6 = (uintptr_t)fct; return my_##NAME##_6; } \
|
||||
if(my_##NAME##_fct_7 == 0) {my_##NAME##_fct_7 = (uintptr_t)fct; return my_##NAME##_7; } \
|
||||
#define FIND(A, NAME) \
|
||||
static void* find_##NAME##_##A(void* fct) \
|
||||
{ \
|
||||
if(!fct) return fct; \
|
||||
void* tmp = GetNativeFnc((uintptr_t)fct); \
|
||||
if(tmp) return tmp; \
|
||||
if(my_##NAME##_##A##_fct_0 == (uintptr_t)fct) return my_##NAME##_##A##_0; \
|
||||
if(my_##NAME##_##A##_fct_1 == (uintptr_t)fct) return my_##NAME##_##A##_1; \
|
||||
if(my_##NAME##_##A##_fct_2 == (uintptr_t)fct) return my_##NAME##_##A##_2; \
|
||||
if(my_##NAME##_##A##_fct_3 == (uintptr_t)fct) return my_##NAME##_##A##_3; \
|
||||
if(my_##NAME##_##A##_fct_4 == (uintptr_t)fct) return my_##NAME##_##A##_4; \
|
||||
if(my_##NAME##_##A##_fct_5 == (uintptr_t)fct) return my_##NAME##_##A##_5; \
|
||||
if(my_##NAME##_##A##_fct_6 == (uintptr_t)fct) return my_##NAME##_##A##_6; \
|
||||
if(my_##NAME##_##A##_fct_7 == (uintptr_t)fct) return my_##NAME##_##A##_7; \
|
||||
if(my_##NAME##_##A##_fct_0 == 0) {my_##NAME##_##A##_fct_0 = (uintptr_t)fct; return my_##NAME##_##A##_0; } \
|
||||
if(my_##NAME##_##A##_fct_1 == 0) {my_##NAME##_##A##_fct_1 = (uintptr_t)fct; return my_##NAME##_##A##_1; } \
|
||||
if(my_##NAME##_##A##_fct_2 == 0) {my_##NAME##_##A##_fct_2 = (uintptr_t)fct; return my_##NAME##_##A##_2; } \
|
||||
if(my_##NAME##_##A##_fct_3 == 0) {my_##NAME##_##A##_fct_3 = (uintptr_t)fct; return my_##NAME##_##A##_3; } \
|
||||
if(my_##NAME##_##A##_fct_4 == 0) {my_##NAME##_##A##_fct_4 = (uintptr_t)fct; return my_##NAME##_##A##_4; } \
|
||||
if(my_##NAME##_##A##_fct_5 == 0) {my_##NAME##_##A##_fct_5 = (uintptr_t)fct; return my_##NAME##_##A##_5; } \
|
||||
if(my_##NAME##_##A##_fct_6 == 0) {my_##NAME##_##A##_fct_6 = (uintptr_t)fct; return my_##NAME##_##A##_6; } \
|
||||
if(my_##NAME##_##A##_fct_7 == 0) {my_##NAME##_##A##_fct_7 = (uintptr_t)fct; return my_##NAME##_##A##_7; } \
|
||||
printf_log(LOG_NONE, "Warning, no more slot for " #NAME " gtkclass callback\n"); \
|
||||
return NULL; \
|
||||
}
|
||||
|
||||
#define WRAPPER(A, NAME, RET, DEF, N, ...) \
|
||||
WRAPPED(0, NAME, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(1, NAME, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(2, NAME, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(3, NAME, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(4, NAME, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(5, NAME, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(6, NAME, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(7, NAME, RET, DEF, N, __VA_ARGS__) \
|
||||
FIND(NAME)
|
||||
#define REVERSE(A, NAME) \
|
||||
static void* reverse_##NAME##_##A(wrapper_t W, void* fct) \
|
||||
{ \
|
||||
if(!fct) return fct; \
|
||||
if((void*)my_##NAME##_##A##_0 == fct) return (void*)my_##NAME##_##A##_fct_0;\
|
||||
if((void*)my_##NAME##_##A##_1 == fct) return (void*)my_##NAME##_##A##_fct_1;\
|
||||
if((void*)my_##NAME##_##A##_2 == fct) return (void*)my_##NAME##_##A##_fct_2;\
|
||||
if((void*)my_##NAME##_##A##_3 == fct) return (void*)my_##NAME##_##A##_fct_3;\
|
||||
if((void*)my_##NAME##_##A##_4 == fct) return (void*)my_##NAME##_##A##_fct_4;\
|
||||
if((void*)my_##NAME##_##A##_5 == fct) return (void*)my_##NAME##_##A##_fct_5;\
|
||||
if((void*)my_##NAME##_##A##_6 == fct) return (void*)my_##NAME##_##A##_fct_6;\
|
||||
if((void*)my_##NAME##_##A##_7 == fct) return (void*)my_##NAME##_##A##_fct_7;\
|
||||
Dl_info info; \
|
||||
if(dladdr(fct, &info)) \
|
||||
return (void*)AddCheckBridge(my_bridge, W, fct, 0); \
|
||||
return fct; \
|
||||
}
|
||||
|
||||
#define AUTOBRIDGE(A, NAME) \
|
||||
static void autobridge_##NAME##_##A(wrapper_t W, void* fct) \
|
||||
{ \
|
||||
if(!fct) \
|
||||
return; \
|
||||
Dl_info info; \
|
||||
if(dladdr(fct, &info)) \
|
||||
AddAutomaticBridge(thread_get_emu(), my_bridge, W, fct, 0); \
|
||||
}
|
||||
|
||||
#define WRAPPER(A, NAME, RET, DEF, N, ...) \
|
||||
WRAPPED(0, NAME##_##A, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(1, NAME##_##A, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(2, NAME##_##A, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(3, NAME##_##A, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(4, NAME##_##A, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(5, NAME##_##A, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(6, NAME##_##A, RET, DEF, N, __VA_ARGS__) \
|
||||
WRAPPED(7, NAME##_##A, RET, DEF, N, __VA_ARGS__) \
|
||||
FIND(A, NAME) \
|
||||
REVERSE(A, NAME) \
|
||||
AUTOBRIDGE(A, NAME)
|
||||
|
||||
// ----- GObjectClass ------
|
||||
// wrapper x86 -> natives of callbacks
|
||||
WRAPPER(A, constructor, void*, (int type, uint32_t n_construct_properties, void* construct_properties), 3, type, n_construct_properties, construct_properties);
|
||||
WRAPPER(A, set_property, void, (void* object, uint32_t property_id, void* value, void* pspec), 4, object, property_id, value, pspec);
|
||||
WRAPPER(A, get_property, void, (void* object, uint32_t property_id, void* value, void* pspec), 4, object, property_id, value, pspec);
|
||||
WRAPPER(A, dispose, void, (void* object), 1, object);
|
||||
WRAPPER(A, finalize, void, (void* object), 1, object);
|
||||
WRAPPER(A, dispatch_properties_changed, void*, (int type, uint32_t n_pspecs, void* pspecs), 3, type, n_pspecs, pspecs);
|
||||
WRAPPER(A, notify, void*, (int type, void* pspecs), 2, type, pspecs);
|
||||
WRAPPER(A, constructed, void, (void* object), 1, object);
|
||||
WRAPPER(GObject, constructor, void*, (int type, uint32_t n_construct_properties, void* construct_properties), 3, type, n_construct_properties, construct_properties);
|
||||
WRAPPER(GObject, set_property, void, (void* object, uint32_t property_id, void* value, void* pspec), 4, object, property_id, value, pspec);
|
||||
WRAPPER(GObject, get_property, void, (void* object, uint32_t property_id, void* value, void* pspec), 4, object, property_id, value, pspec);
|
||||
WRAPPER(GObject, dispose, void, (void* object), 1, object);
|
||||
WRAPPER(GObject, finalize, void, (void* object), 1, object);
|
||||
WRAPPER(GObject, dispatch_properties_changed, void*, (int type, uint32_t n_pspecs, void* pspecs), 3, type, n_pspecs, pspecs);
|
||||
WRAPPER(GObject, notify, void*, (int type, void* pspecs), 2, type, pspecs);
|
||||
WRAPPER(GObject, constructed, void, (void* object), 1, object);
|
||||
|
||||
#define SUPERGO() \
|
||||
GO(constructor, pFiup); \
|
||||
@@ -100,15 +135,21 @@ WRAPPER(A, constructed, void, (void* object), 1, object);
|
||||
// wrap (so bridge all calls, just in case)
|
||||
static void wrapGObjectClass(my_GObjectClass_t* class)
|
||||
{
|
||||
#define GO(A, W) if(class->A) class->A = (void*)AddCheckBridge(my_bridge, W, class->A, 0)
|
||||
#define GO(A, W) class->A = reverse_##A##_GObject (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// unwrap (and use callback if not a native call anymore)
|
||||
static void unwrapGObjectClass(my_GObjectClass_t* class)
|
||||
{
|
||||
void* tmp;
|
||||
#define GO(A, W) if(class->A) {tmp = GetNativeFnc((uintptr_t)class->A); if(tmp) class->A = tmp; else class->A = find_##A (class->A);}
|
||||
#define GO(A, W) class->A = find_##A##_GObject (class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// autobridge
|
||||
static void bridgeGObjectClass(my_GObjectClass_t* class)
|
||||
{
|
||||
#define GO(A, W) autobridge_##A##_GObject (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
@@ -116,9 +157,9 @@ static void unwrapGObjectClass(my_GObjectClass_t* class)
|
||||
|
||||
// ----- GtkObjectClass ------
|
||||
// wrapper x86 -> natives of callbacks
|
||||
WRAPPER(A, set_arg, void, (void* object, void* arg, uint32_t arg_id), 3, object, arg, arg_id);
|
||||
WRAPPER(A, get_arg, void, (void* object, void* arg, uint32_t arg_id), 3, object, arg, arg_id);
|
||||
WRAPPER(A, destroy, void, (void* object), 1, object);
|
||||
WRAPPER(GtkObject, set_arg, void, (void* object, void* arg, uint32_t arg_id), 3, object, arg, arg_id);
|
||||
WRAPPER(GtkObject, get_arg, void, (void* object, void* arg, uint32_t arg_id), 3, object, arg, arg_id);
|
||||
WRAPPER(GtkObject, destroy, void, (void* object), 1, object);
|
||||
|
||||
#define SUPERGO() \
|
||||
GO(set_arg, vFppu); \
|
||||
@@ -128,7 +169,7 @@ WRAPPER(A, destroy, void, (void* object), 1, object);
|
||||
static void wrapGtkObjectClass(my_GtkObjectClass_t* class)
|
||||
{
|
||||
wrapGObjectClass(&class->parent_class);
|
||||
#define GO(A, W) if(class->A) class->A = (void*)AddCheckBridge(my_bridge, W, class->A, 0)
|
||||
#define GO(A, W) class->A = reverse_##A##_GtkObject (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
@@ -136,81 +177,89 @@ static void wrapGtkObjectClass(my_GtkObjectClass_t* class)
|
||||
static void unwrapGtkObjectClass(my_GtkObjectClass_t* class)
|
||||
{
|
||||
unwrapGObjectClass(&class->parent_class);
|
||||
void* tmp;
|
||||
#define GO(A, W) if(class->A) {tmp = GetNativeFnc((uintptr_t)class->A); if(tmp) class->A = tmp; else class->A = find_##A (class->A);}
|
||||
#define GO(A, W) class->A = find_##A##_GtkObject (class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// autobridge
|
||||
static void bridgeGtkObjectClass(my_GtkObjectClass_t* class)
|
||||
{
|
||||
bridgeGObjectClass(&class->parent_class);
|
||||
#define GO(A, W) autobridge_##A##_GtkObject (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
|
||||
#undef SUPERGO
|
||||
|
||||
// ----- GtkWidgetClass ------
|
||||
// wrapper x86 -> natives of callbacks
|
||||
WRAPPER(A, dispatch_child_properties_changed, void, (void* widget, uint32_t n_pspecs, void* pspecs), 3, widget, n_pspecs, pspecs);
|
||||
WRAPPER(A, show, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, show_all, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, hide, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, hide_all, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, map, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, unmap, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, realize, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, unrealize, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, size_request, void, (void* widget, void* requisition), 2, widget, requisition);
|
||||
WRAPPER(A, size_allocate, void, (void* widget, void* allocation), 2, widget, allocation);
|
||||
WRAPPER(A, state_changed, void, (void* widget, int previous_state), 2, widget, previous_state);
|
||||
WRAPPER(A, parent_set, void, (void* widget, void* previous_parent), 2, widget, previous_parent);
|
||||
WRAPPER(A, hierarchy_changed, void, (void* widget, void* previous_toplevel), 2, widget, previous_toplevel);
|
||||
WRAPPER(A, style_set, void, (void* widget, void* previous_style), 2, widget, previous_style);
|
||||
WRAPPER(A, direction_changed, void, (void* widget, int previous_direction), 2, widget, previous_direction);
|
||||
WRAPPER(A, grab_notify, void, (void* widget, int was_grabbed), 2, widget, was_grabbed);
|
||||
WRAPPER(A, child_notify, void, (void* widget, void* pspec), 2, widget, pspec);
|
||||
WRAPPER(A, mnemonic_activate, int, (void* widget, int group_cycling), 2, widget, group_cycling);
|
||||
WRAPPER(A, grab_focus, void, (void* widget), 1, widget);
|
||||
WRAPPER(A, focus, int, (void* widget, int direction), 2, widget, direction);
|
||||
WRAPPER(A, event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, button_press_event,int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, button_release_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, scroll_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, motion_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, delete_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, destroy_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, expose_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, key_press_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, key_release_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, enter_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, leave_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, configure_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, focus_in_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, focus_out_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, map_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, unmap_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, property_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, selection_clear_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, selection_request_event,int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, selection_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, proximity_in_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, proximity_out_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, visibility_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, client_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, no_expose_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, window_state_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, selection_get, void, (void* widget, void* selection_data, uint32_t info, uint32_t time_), 4, widget, selection_data, info, time_);
|
||||
WRAPPER(A, selection_received, void, (void* widget, void* selection_data, uint32_t time_), 3, widget, selection_data, time_);
|
||||
WRAPPER(A, drag_begin, void, (void* widget, void* context), 2, widget, context);
|
||||
WRAPPER(A, drag_end, void, (void* widget, void* context), 2, widget, context);
|
||||
WRAPPER(A, drag_data_get, void, (void* widget, void* context, void* selection_data, uint32_t info, uint32_t time_), 5, widget, context, selection_data, info, time_);
|
||||
WRAPPER(A, drag_data_delete, void, (void* widget, void* context), 2, widget, context);
|
||||
WRAPPER(A, drag_leave, void, (void* widget, void* context, uint32_t time_), 3, widget, context, time_);
|
||||
WRAPPER(A, drag_motion, int, (void* widget, void* context, int32_t x, int32_t y, uint32_t time_), 5, widget, context, x, y, time_);
|
||||
WRAPPER(A, drag_drop, int, (void* widget, void* context, int32_t x, int32_t y, uint32_t time_), 5, widget, context, x, y, time_);
|
||||
WRAPPER(A, drag_data_received, void, (void* widget, void* context, int32_t x, int32_t y, void* selection_data, uint32_t info, uint32_t time_), 7, widget, context, x, y, selection_data, info, time_);
|
||||
WRAPPER(A, popup_menu, int , (void* widget), 1, widget);
|
||||
WRAPPER(A, show_help, int , (void* widget, int help_type), 2, widget, help_type);
|
||||
WRAPPER(A, get_accessible, void*, (void* widget), 1, widget);
|
||||
WRAPPER(A, screen_changed, void , (void* widget, void* previous_screen), 2, widget, previous_screen);
|
||||
WRAPPER(A, can_activate_accel, int , (void* widget, uint32_t signal_id), 2, widget, signal_id);
|
||||
WRAPPER(A, grab_broken_event, int , (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(A, composited_changed, void , (void* widget), 1, widget);
|
||||
WRAPPER(A, query_tooltip, int , (void* widget, int32_t x, int32_t y, int keyboard_tooltip, void* tooltip), 5, widget, x, y, keyboard_tooltip, tooltip);
|
||||
WRAPPER(GtkWidget, dispatch_child_properties_changed, void, (void* widget, uint32_t n_pspecs, void* pspecs), 3, widget, n_pspecs, pspecs);
|
||||
WRAPPER(GtkWidget, show, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, show_all, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, hide, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, hide_all, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, map, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, unmap, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, realize, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, unrealize, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, size_request, void, (void* widget, void* requisition), 2, widget, requisition);
|
||||
WRAPPER(GtkWidget, size_allocate, void, (void* widget, void* allocation), 2, widget, allocation);
|
||||
WRAPPER(GtkWidget, state_changed, void, (void* widget, int previous_state), 2, widget, previous_state);
|
||||
WRAPPER(GtkWidget, parent_set, void, (void* widget, void* previous_parent), 2, widget, previous_parent);
|
||||
WRAPPER(GtkWidget, hierarchy_changed, void, (void* widget, void* previous_toplevel), 2, widget, previous_toplevel);
|
||||
WRAPPER(GtkWidget, style_set, void, (void* widget, void* previous_style), 2, widget, previous_style);
|
||||
WRAPPER(GtkWidget, direction_changed, void, (void* widget, int previous_direction), 2, widget, previous_direction);
|
||||
WRAPPER(GtkWidget, grab_notify, void, (void* widget, int was_grabbed), 2, widget, was_grabbed);
|
||||
WRAPPER(GtkWidget, child_notify, void, (void* widget, void* pspec), 2, widget, pspec);
|
||||
WRAPPER(GtkWidget, mnemonic_activate, int, (void* widget, int group_cycling), 2, widget, group_cycling);
|
||||
WRAPPER(GtkWidget, grab_focus, void, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, focus, int, (void* widget, int direction), 2, widget, direction);
|
||||
WRAPPER(GtkWidget, event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, button_press_event,int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, button_release_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, scroll_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, motion_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, delete_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, destroy_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, expose_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, key_press_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, key_release_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, enter_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, leave_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, configure_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, focus_in_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, focus_out_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, map_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, unmap_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, property_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, selection_clear_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, selection_request_event,int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, selection_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, proximity_in_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, proximity_out_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, visibility_notify_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, client_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, no_expose_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, window_state_event, int, (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, selection_get, void, (void* widget, void* selection_data, uint32_t info, uint32_t time_), 4, widget, selection_data, info, time_);
|
||||
WRAPPER(GtkWidget, selection_received, void, (void* widget, void* selection_data, uint32_t time_), 3, widget, selection_data, time_);
|
||||
WRAPPER(GtkWidget, drag_begin, void, (void* widget, void* context), 2, widget, context);
|
||||
WRAPPER(GtkWidget, drag_end, void, (void* widget, void* context), 2, widget, context);
|
||||
WRAPPER(GtkWidget, drag_data_get, void, (void* widget, void* context, void* selection_data, uint32_t info, uint32_t time_), 5, widget, context, selection_data, info, time_);
|
||||
WRAPPER(GtkWidget, drag_data_delete, void, (void* widget, void* context), 2, widget, context);
|
||||
WRAPPER(GtkWidget, drag_leave, void, (void* widget, void* context, uint32_t time_), 3, widget, context, time_);
|
||||
WRAPPER(GtkWidget, drag_motion, int, (void* widget, void* context, int32_t x, int32_t y, uint32_t time_), 5, widget, context, x, y, time_);
|
||||
WRAPPER(GtkWidget, drag_drop, int, (void* widget, void* context, int32_t x, int32_t y, uint32_t time_), 5, widget, context, x, y, time_);
|
||||
WRAPPER(GtkWidget, drag_data_received, void, (void* widget, void* context, int32_t x, int32_t y, void* selection_data, uint32_t info, uint32_t time_), 7, widget, context, x, y, selection_data, info, time_);
|
||||
WRAPPER(GtkWidget, popup_menu, int , (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, show_help, int , (void* widget, int help_type), 2, widget, help_type);
|
||||
WRAPPER(GtkWidget, get_accessible, void*, (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, screen_changed, void , (void* widget, void* previous_screen), 2, widget, previous_screen);
|
||||
WRAPPER(GtkWidget, can_activate_accel, int , (void* widget, uint32_t signal_id), 2, widget, signal_id);
|
||||
WRAPPER(GtkWidget, grab_broken_event, int , (void* widget, void* event), 2, widget, event);
|
||||
WRAPPER(GtkWidget, composited_changed, void , (void* widget), 1, widget);
|
||||
WRAPPER(GtkWidget, query_tooltip, int , (void* widget, int32_t x, int32_t y, int keyboard_tooltip, void* tooltip), 5, widget, x, y, keyboard_tooltip, tooltip);
|
||||
|
||||
#define SUPERGO() \
|
||||
GO(dispatch_child_properties_changed, vFpup); \
|
||||
@@ -284,7 +333,7 @@ WRAPPER(A, query_tooltip, int , (void* widget, int32_t x, int32_t y, int
|
||||
static void wrapGtkWidgetClass(my_GtkWidgetClass_t* class)
|
||||
{
|
||||
wrapGtkObjectClass(&class->parent_class);
|
||||
#define GO(A, W) if(class->A) class->A = (void*)AddCheckBridge(my_bridge, W, class->A, 0)
|
||||
#define GO(A, W) class->A = reverse_##A##_GtkWidget (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
@@ -292,24 +341,32 @@ static void wrapGtkWidgetClass(my_GtkWidgetClass_t* class)
|
||||
static void unwrapGtkWidgetClass(my_GtkWidgetClass_t* class)
|
||||
{
|
||||
unwrapGtkObjectClass(&class->parent_class);
|
||||
void* tmp;
|
||||
#define GO(A, W) if(class->A) {tmp = GetNativeFnc((uintptr_t)class->A); if(tmp) class->A = tmp; else class->A = find_##A (class->A);}
|
||||
#define GO(A, W) class->A = find_##A##_GtkWidget (class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// autobridge
|
||||
static void bridgeGtkWidgetClass(my_GtkWidgetClass_t* class)
|
||||
{
|
||||
bridgeGtkObjectClass(&class->parent_class);
|
||||
#define GO(A, W) autobridge_##A##_GtkWidget (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
|
||||
#undef SUPERGO
|
||||
|
||||
// ----- GtkContainerClass ------
|
||||
// wrapper x86 -> natives of callbacks
|
||||
WRAPPER(A, add, void, (void* container, void* widget), 2, container, widget);
|
||||
WRAPPER(A, remove, void, (void* container, void* widget), 2, container, widget);
|
||||
WRAPPER(A, check_resize, void, (void* container), 1, container);
|
||||
WRAPPER(A, forall, void, (void* container, int include_internals, void* callback, void* callback_data), 4, container, include_internals, AddCheckBridge(my_bridge, vFpp, callback, 0), callback_data);
|
||||
WRAPPER(A, set_focus_child, void, (void* container, void* widget), 2, container, widget);
|
||||
WRAPPER(A, child_type, int, (void* container), 1, container);
|
||||
WRAPPER(A, composite_name, void*, (void* container, void* child), 2, container, child);
|
||||
WRAPPER(A, set_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), 5, container, child, property_id, value, pspec);
|
||||
WRAPPER(A, get_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), 5, container, child, property_id, value, pspec);
|
||||
WRAPPER(GtkContainer, add, void, (void* container, void* widget), 2, container, widget);
|
||||
WRAPPER(GtkContainer, remove, void, (void* container, void* widget), 2, container, widget);
|
||||
WRAPPER(GtkContainer, check_resize, void, (void* container), 1, container);
|
||||
WRAPPER(GtkContainer, forall, void, (void* container, int include_internals, void* callback, void* callback_data), 4, container, include_internals, AddCheckBridge(my_bridge, vFpp, callback, 0), callback_data);
|
||||
WRAPPER(GtkContainer, set_focus_child, void, (void* container, void* widget), 2, container, widget);
|
||||
WRAPPER(GtkContainer, child_type, int, (void* container), 1, container);
|
||||
WRAPPER(GtkContainer, composite_name, void*, (void* container, void* child), 2, container, child);
|
||||
WRAPPER(GtkContainer, set_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), 5, container, child, property_id, value, pspec);
|
||||
WRAPPER(GtkContainer, get_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), 5, container, child, property_id, value, pspec);
|
||||
|
||||
#define SUPERGO() \
|
||||
GO(add, vFpp); \
|
||||
@@ -326,7 +383,7 @@ WRAPPER(A, get_child_property, void, (void* container, void* child, uint32_t pro
|
||||
static void wrapGtkContainerClass(my_GtkContainerClass_t* class)
|
||||
{
|
||||
wrapGtkWidgetClass(&class->parent_class);
|
||||
#define GO(A, W) if(class->A) class->A = (void*)AddCheckBridge(my_bridge, W, class->A, 0)
|
||||
#define GO(A, W) class->A = reverse_##A##_GtkContainer (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
@@ -334,89 +391,306 @@ static void wrapGtkContainerClass(my_GtkContainerClass_t* class)
|
||||
static void unwrapGtkContainerClass(my_GtkContainerClass_t* class)
|
||||
{
|
||||
unwrapGtkWidgetClass(&class->parent_class);
|
||||
void* tmp;
|
||||
#define GO(A, W) if(class->A) {tmp = GetNativeFnc((uintptr_t)class->A); if(tmp) class->A = tmp; else class->A = find_##A (class->A);}
|
||||
#define GO(A, W) class->A = find_##A##_GtkContainer (class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// autobridge
|
||||
static void bridgeGtkContainerClass(my_GtkContainerClass_t* class)
|
||||
{
|
||||
bridgeGtkWidgetClass(&class->parent_class);
|
||||
#define GO(A, W) autobridge_##A##_GtkContainer (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
|
||||
#undef SUPERGO
|
||||
|
||||
// ----- GtkActionClass ------
|
||||
// wrapper x86 -> natives of callbacks
|
||||
WRAPPER(GtkAction, activate, void, (void* action), 1, action);
|
||||
WRAPPER(GtkAction, create_menu_item, void*, (void* action), 1, action);
|
||||
WRAPPER(GtkAction, create_tool_item, void*, (void* action), 1, action);
|
||||
WRAPPER(GtkAction, connect_proxy, void , (void* action, void* proxy), 2, action, proxy);
|
||||
WRAPPER(GtkAction, disconnect_proxy, void , (void* action, void* proxy), 2, action, proxy);
|
||||
WRAPPER(GtkAction, create_menu, void*, (void* action), 1, action);
|
||||
|
||||
#define SUPERGO() \
|
||||
GO(activate, vFp); \
|
||||
GO(create_menu_item, pFp); \
|
||||
GO(create_tool_item, pFp); \
|
||||
GO(connect_proxy, vFpp); \
|
||||
GO(disconnect_proxy, vFpp); \
|
||||
GO(create_menu, pFp); \
|
||||
|
||||
// wrap (so bridge all calls, just in case)
|
||||
static void wrapGtkActionClass(my_GtkActionClass_t* class)
|
||||
{
|
||||
wrapGObjectClass(&class->parent_class);
|
||||
#define GO(A, W) class->A = reverse_##A##_GtkAction (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// unwrap (and use callback if not a native call anymore)
|
||||
static void unwrapGtkActionClass(my_GtkActionClass_t* class)
|
||||
{
|
||||
unwrapGObjectClass(&class->parent_class);
|
||||
#define GO(A, W) class->A = find_##A##_GtkAction (class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// autobridge
|
||||
static void bridgeGtkActionClass(my_GtkActionClass_t* class)
|
||||
{
|
||||
bridgeGObjectClass(&class->parent_class);
|
||||
#define GO(A, W) autobridge_##A##_GtkAction (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
#undef SUPERGO
|
||||
|
||||
// ----- GtkMiscClass ------
|
||||
|
||||
// wrap (so bridge all calls, just in case)
|
||||
static void wrapGtkMiscClass(my_GtkMiscClass_t* class)
|
||||
{
|
||||
wrapGtkWidgetClass(&class->parent_class);
|
||||
}
|
||||
// unwrap (and use callback if not a native call anymore)
|
||||
static void unwrapGtkMiscClass(my_GtkMiscClass_t* class)
|
||||
{
|
||||
unwrapGtkWidgetClass(&class->parent_class);
|
||||
}
|
||||
// autobridge
|
||||
static void bridgeGtkMiscClass(my_GtkMiscClass_t* class)
|
||||
{
|
||||
bridgeGtkWidgetClass(&class->parent_class);
|
||||
}
|
||||
|
||||
|
||||
// ----- GtkLabelClass ------
|
||||
// wrapper x86 -> natives of callbacks
|
||||
WRAPPER(GtkMisc, move_cursor, void, (void* label, int step, int count, int extend_selection), 4, label, step, count, extend_selection);
|
||||
WRAPPER(GtkMisc, copy_clipboard, void, (void* label), 1, label);
|
||||
WRAPPER(GtkMisc, populate_popup, void, (void* label, void* menu), 2, label, menu);
|
||||
WRAPPER(GtkMisc, activate_link, int, (void* label, void* uri), 2, label, uri);
|
||||
|
||||
#define SUPERGO() \
|
||||
GO(move_cursor, vFpiii); \
|
||||
GO(copy_clipboard, vFp); \
|
||||
GO(populate_popup, vFpp); \
|
||||
GO(activate_link, iFpp); \
|
||||
|
||||
// wrap (so bridge all calls, just in case)
|
||||
static void wrapGtkLabelClass(my_GtkLabelClass_t* class)
|
||||
{
|
||||
wrapGtkMiscClass(&class->parent_class);
|
||||
#define GO(A, W) class->A = reverse_##A##_GtkMisc (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// unwrap (and use callback if not a native call anymore)
|
||||
static void unwrapGtkLabelClass(my_GtkLabelClass_t* class)
|
||||
{
|
||||
unwrapGtkMiscClass(&class->parent_class);
|
||||
#define GO(A, W) class->A = find_##A##_GtkMisc (class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// autobridge
|
||||
static void bridgeGtkLabelClass(my_GtkLabelClass_t* class)
|
||||
{
|
||||
bridgeGtkMiscClass(&class->parent_class);
|
||||
#define GO(A, W) autobridge_##A##_GtkMisc (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
#undef SUPERGO
|
||||
|
||||
// ----- GtkTreeViewClass ------
|
||||
// wrapper x86 -> natives of callbacks
|
||||
WRAPPER(GtkTreeView, set_scroll_adjustments, void, (void* tree_view, void* hadjustment, void* vadjustment), 3, tree_view, hadjustment, vadjustment);
|
||||
WRAPPER(GtkTreeView, row_activated, void, (void* tree_view, void* path, void* column), 3, tree_view, path, column);
|
||||
WRAPPER(GtkTreeView, test_expand_row, int, (void* tree_view, void* iter, void* path), 3, tree_view, iter, path);
|
||||
WRAPPER(GtkTreeView, test_collapse_row, int, (void* tree_view, void* iter, void* path), 3, tree_view, iter, path);
|
||||
WRAPPER(GtkTreeView, row_expanded, void, (void* tree_view, void* iter, void* path), 3, tree_view, iter, path);
|
||||
WRAPPER(GtkTreeView, row_collapsed, void, (void* tree_view, void* iter, void* path), 3, tree_view, iter, path);
|
||||
WRAPPER(GtkTreeView, columns_changed, void, (void* tree_view), 1, tree_view);
|
||||
WRAPPER(GtkTreeView, cursor_changed, void, (void* tree_view), 1, tree_view);
|
||||
WRAPPER(GtkTreeView, move_cursor, int, (void* tree_view, int step, int count), 3, tree_view, step, count);
|
||||
WRAPPER(GtkTreeView, select_all, int, (void* tree_view), 1, tree_view);
|
||||
WRAPPER(GtkTreeView, unselect_all, int, (void* tree_view), 1, tree_view);
|
||||
WRAPPER(GtkTreeView, select_cursor_row, int, (void* tree_view, int start_editing), 2, tree_view, start_editing);
|
||||
WRAPPER(GtkTreeView, toggle_cursor_row, int, (void* tree_view), 1, tree_view);
|
||||
WRAPPER(GtkTreeView, expand_collapse_cursor_row, int, (void* tree_view, int logical, int expand, int open_all), 4, tree_view, logical, expand, open_all);
|
||||
WRAPPER(GtkTreeView, select_cursor_parent, int, (void* tree_view), 1, tree_view);
|
||||
WRAPPER(GtkTreeView, start_interactive_search, int, (void* tree_view), 1, tree_view);
|
||||
|
||||
#define SUPERGO() \
|
||||
GO(set_scroll_adjustments, vFppp); \
|
||||
GO(row_activated, vFppp); \
|
||||
GO(test_expand_row, iFppp); \
|
||||
GO(test_collapse_row, iFppp); \
|
||||
GO(row_expanded, vFppp); \
|
||||
GO(row_collapsed, vFppp); \
|
||||
GO(columns_changed, vFp); \
|
||||
GO(cursor_changed, vFp); \
|
||||
GO(move_cursor, iFppp); \
|
||||
GO(select_all, iFp); \
|
||||
GO(unselect_all, iFp); \
|
||||
GO(select_cursor_row, iFpi); \
|
||||
GO(toggle_cursor_row, iFp); \
|
||||
GO(expand_collapse_cursor_row, iFpiii); \
|
||||
GO(select_cursor_parent, iFp); \
|
||||
GO(start_interactive_search, iFp); \
|
||||
|
||||
// wrap (so bridge all calls, just in case)
|
||||
static void wrapGtkTreeViewClass(my_GtkTreeViewClass_t* class)
|
||||
{
|
||||
wrapGtkContainerClass(&class->parent_class);
|
||||
#define GO(A, W) class->A = reverse_##A##_GtkTreeView (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// unwrap (and use callback if not a native call anymore)
|
||||
static void unwrapGtkTreeViewClass(my_GtkTreeViewClass_t* class)
|
||||
{
|
||||
unwrapGtkContainerClass(&class->parent_class);
|
||||
#define GO(A, W) class->A = find_##A##_GtkTreeView (class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
// autobridge
|
||||
static void bridgeGtkTreeViewClass(my_GtkTreeViewClass_t* class)
|
||||
{
|
||||
bridgeGtkContainerClass(&class->parent_class);
|
||||
#define GO(A, W) autobridge_##A##_GtkTreeView (W, class->A)
|
||||
SUPERGO()
|
||||
#undef GO
|
||||
}
|
||||
|
||||
#undef SUPERGO
|
||||
|
||||
// No more wrap/unwrap
|
||||
#undef WRAPPER
|
||||
#undef FIND
|
||||
#undef REVERSE
|
||||
#undef WRAPPED
|
||||
|
||||
static void wrapGTKClass(void* class, int type)
|
||||
// g_type_class_peek_parent
|
||||
static void wrapGTKClass(void* cl, int type)
|
||||
{
|
||||
if(type==my_gtkcontainer)
|
||||
wrapGtkContainerClass((my_GtkContainerClass_t*)class);
|
||||
else if(type==my_gtkwidget)
|
||||
wrapGtkWidgetClass((my_GtkWidgetClass_t*)class);
|
||||
else if(type==my_gtkobject)
|
||||
wrapGtkObjectClass((my_GtkObjectClass_t*)class);
|
||||
else if(type==my_gobject)
|
||||
wrapGObjectClass((my_GObjectClass_t*)class);
|
||||
else {
|
||||
printf_log(LOG_INFO, "Warning, Custom Class initializer with unknown class type %d (%s)\n", type, g_type_name(type));
|
||||
#define GTKCLASS(A) \
|
||||
if(type==my_##A) \
|
||||
wrap##A##Class((my_##A##Class_t*)cl); \
|
||||
else
|
||||
GTKCLASSES()
|
||||
{
|
||||
printf_log(LOG_NONE, "Warning, Custom Class initializer with unknown class type %d (%s)\n", type, g_type_name(type));
|
||||
}
|
||||
#undef GTKCLASS
|
||||
}
|
||||
|
||||
static void unwrapGTKClass(void* class, int type)
|
||||
static void unwrapGTKClass(void* cl, int type)
|
||||
{
|
||||
if(type==my_gtkcontainer)
|
||||
unwrapGtkContainerClass((my_GtkContainerClass_t*)class);
|
||||
else if(type==my_gtkwidget)
|
||||
unwrapGtkWidgetClass((my_GtkWidgetClass_t*)class);
|
||||
else if(type==my_gtkobject)
|
||||
unwrapGtkObjectClass((my_GtkObjectClass_t*)class);
|
||||
else if(type==my_gobject)
|
||||
unwrapGObjectClass((my_GObjectClass_t*)class);
|
||||
// no warning, one is enough...
|
||||
#define GTKCLASS(A) \
|
||||
if(type==my_##A) \
|
||||
unwrap##A##Class((my_##A##Class_t*)cl); \
|
||||
else
|
||||
GTKCLASSES()
|
||||
{} // else no warning, one is enough...
|
||||
#undef GTKCLASS
|
||||
}
|
||||
|
||||
// ---- GTKClass -----
|
||||
static void** table_ref = NULL;
|
||||
static void** table_nat = NULL;
|
||||
static int table_sz = 0;
|
||||
static int table_cap = 0;
|
||||
void* wrapCopyGTKClass(void* class, int type)
|
||||
static void bridgeGTKClass(void* cl, int type)
|
||||
{
|
||||
// search for an existing ref...
|
||||
for (int i=0; i<table_sz; ++i)
|
||||
if(table_ref[i] == class)
|
||||
return table_nat[i];
|
||||
// add a new one...
|
||||
if(table_sz == table_cap) {
|
||||
table_cap += 4;
|
||||
table_ref = (void**)realloc(table_ref, sizeof(void*)*table_cap);
|
||||
table_nat = (void**)realloc(table_nat, sizeof(void*)*table_cap);
|
||||
#define GTKCLASS(A) \
|
||||
if(type==my_##A) \
|
||||
bridge##A##Class((my_##A##Class_t*)cl); \
|
||||
else
|
||||
GTKCLASSES()
|
||||
{
|
||||
printf_log(LOG_NONE, "Warning, AutoBridge GTK Class with unknown class type %d (%s)\n", type, g_type_name(type));
|
||||
}
|
||||
table_ref[table_sz] = class;
|
||||
if(type==my_gtkcontainer) {
|
||||
my_GtkContainerClass_t *tmp = (my_GtkContainerClass_t*)malloc(sizeof(my_GtkContainerClass_t));
|
||||
memcpy(tmp, class, sizeof(my_GtkContainerClass_t));
|
||||
wrapGtkContainerClass(tmp);
|
||||
table_nat[table_sz] = tmp;
|
||||
} else if(type==my_gtkwidget) {
|
||||
my_GtkWidgetClass_t *tmp = (my_GtkWidgetClass_t*)malloc(sizeof(my_GtkWidgetClass_t));
|
||||
memcpy(tmp, class, sizeof(my_GtkWidgetClass_t));
|
||||
wrapGtkWidgetClass(tmp);
|
||||
table_nat[table_sz] = tmp;
|
||||
} else if(type==my_gtkobject) {
|
||||
my_GtkObjectClass_t *tmp = (my_GtkObjectClass_t*)malloc(sizeof(my_GtkObjectClass_t));
|
||||
memcpy(tmp, class, sizeof(my_GtkObjectClass_t));
|
||||
wrapGtkObjectClass((my_GtkObjectClass_t*)class);
|
||||
table_nat[table_sz] = tmp;
|
||||
} else if(type==my_gobject) {
|
||||
my_GObjectClass_t *tmp = (my_GObjectClass_t*)malloc(sizeof(my_GObjectClass_t));
|
||||
memcpy(tmp, class, sizeof(my_GObjectClass_t));
|
||||
wrapGObjectClass((my_GObjectClass_t*)class);
|
||||
table_nat[table_sz] = tmp;
|
||||
} else {
|
||||
printf_log(LOG_INFO, "Warning, Custom Class function with unknown class type %d (%s)\n", type, g_type_name(type));
|
||||
return class;
|
||||
#undef GTKCLASS
|
||||
}
|
||||
|
||||
|
||||
typedef union my_GClassAll_s {
|
||||
#define GTKCLASS(A) my_##A##Class_t A;
|
||||
GTKCLASSES()
|
||||
#undef GTKCLASS
|
||||
} my_GClassAll_t;
|
||||
|
||||
#define GO(A) \
|
||||
static void* my_gclassall_ref_##A = NULL; \
|
||||
static my_GClassAll_t my_gclassall_##A;
|
||||
|
||||
SUPER()
|
||||
#undef GO
|
||||
|
||||
void* unwrapCopyGTKClass(void* klass, int type)
|
||||
{
|
||||
if(!klass) return klass;
|
||||
#define GO(A) if(klass == my_gclassall_ref_##A) return &my_gclassall_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
// check if class is the exact type we know
|
||||
int sz = 0;
|
||||
#define GTKCLASS(A) if(type==my_##A) sz = sizeof(my_##A##Class_t); else
|
||||
GTKCLASSES()
|
||||
{
|
||||
printf_log(LOG_NONE, "Warning, unwrapCopyGTKClass called with unknown class type %d (%s)\n", type, g_type_name(type));
|
||||
return klass;
|
||||
}
|
||||
return table_nat[table_sz++];
|
||||
#undef GTKCLASS
|
||||
my_GClassAll_t *newklass = NULL;
|
||||
#define GO(A) if(!newklass && !my_gclassall_ref_##A) {my_gclassall_ref_##A = klass; newklass = &my_gclassall_##A;}
|
||||
SUPER()
|
||||
#undef GO
|
||||
if(!newklass) {
|
||||
printf_log(LOG_NONE, "Warning: no more slot for unwrapCopyGTKClass\n");
|
||||
return klass;
|
||||
}
|
||||
memcpy(newklass, klass, sz);
|
||||
unwrapGTKClass(newklass, type);
|
||||
return newklass;
|
||||
}
|
||||
|
||||
// gtk_type_class
|
||||
|
||||
#define GO(A) \
|
||||
static void* my_gclassallu_ref_##A = NULL; \
|
||||
static my_GClassAll_t my_gclassallu_##A;
|
||||
|
||||
SUPER()
|
||||
#undef GO
|
||||
void* wrapCopyGTKClass(void* klass, int type)
|
||||
{
|
||||
if(!klass) return klass;
|
||||
#define GO(A) if(klass == my_gclassallu_ref_##A) return &my_gclassallu_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
// check if class is the exact type we know
|
||||
int sz = 0;
|
||||
#define GTKCLASS(A) if(type==my_##A) sz = sizeof(my_##A##Class_t); else
|
||||
GTKCLASSES()
|
||||
{
|
||||
printf_log(LOG_NONE, "Warning, wrapCopyGTKClass called with unknown class type 0x%x (%s)\n", type, g_type_name(type));
|
||||
return klass;
|
||||
}
|
||||
#undef GTKCLASS
|
||||
my_GClassAll_t *newklass = NULL;
|
||||
#define GO(A) if(!newklass && !my_gclassallu_ref_##A) {my_gclassallu_ref_##A = klass; newklass = &my_gclassallu_##A;}
|
||||
SUPER()
|
||||
#undef GO
|
||||
if(!newklass) {
|
||||
printf_log(LOG_NONE, "Warning: no more slot for wrapCopyGTKClass\n");
|
||||
return klass;
|
||||
}
|
||||
memcpy(newklass, klass, sz);
|
||||
wrapGTKClass(newklass, type);
|
||||
return newklass;
|
||||
}
|
||||
|
||||
// ---- GTypeValueTable ----
|
||||
@@ -636,38 +910,41 @@ my_GtkTypeInfo_t* findFreeGtkTypeInfo(my_GtkTypeInfo_t* fcts, int parent)
|
||||
void InitGTKClass(bridge_t *bridge)
|
||||
{
|
||||
my_bridge = bridge;
|
||||
my_signalmap = kh_init(signalmap);
|
||||
}
|
||||
|
||||
void FiniGTKClass()
|
||||
{
|
||||
if(table_ref)
|
||||
free(table_ref);
|
||||
for (int i=0; i<table_sz; ++i)
|
||||
free(table_nat[i]);
|
||||
if(table_nat)
|
||||
free(table_nat);
|
||||
table_ref = table_nat = NULL;
|
||||
table_sz = table_cap = 0;
|
||||
if(my_signalmap) {
|
||||
/*khint_t k;
|
||||
kh_foreach_key(my_signalmap, k,
|
||||
my_signal_t* p = (my_signal_t*)(uintptr_t)k;
|
||||
free(p);
|
||||
);*/ // lets assume all signals data is freed by gtk already
|
||||
kh_destroy(signalmap, my_signalmap);
|
||||
my_signalmap = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void SetGObjectID(int id)
|
||||
{
|
||||
my_gobject = id;
|
||||
#define GTKCLASS(A) \
|
||||
void Set##A##ID(int id) \
|
||||
{ \
|
||||
my_##A = id; \
|
||||
}
|
||||
GTKCLASSES()
|
||||
#undef GTKCLASS
|
||||
|
||||
void SetGTKObjectID(int id)
|
||||
void AutoBridgeGtk(void*(*ref)(int), void(*unref)(void*))
|
||||
{
|
||||
my_gtkobject = id;
|
||||
}
|
||||
|
||||
void SetGTKWidgetID(int id)
|
||||
{
|
||||
my_gtkwidget = id;
|
||||
}
|
||||
|
||||
void SetGTKContainerID(int id)
|
||||
{
|
||||
my_gtkcontainer = id;
|
||||
void* p;
|
||||
#define GTKCLASS(A) \
|
||||
if(my_##A && my_##A!=-1) { \
|
||||
p = ref(my_##A); \
|
||||
bridgeGTKClass(p, my_##A); \
|
||||
unref(p); \
|
||||
}
|
||||
GTKCLASSES()
|
||||
#undef GTKCLASS
|
||||
}
|
||||
|
||||
void SetGTypeName(void* f)
|
||||
@@ -722,10 +999,18 @@ my_signal_t* new_mysignal(void* f, void* data, void* destroy)
|
||||
sig->c_handler = (uintptr_t)f;
|
||||
sig->destroy = (uintptr_t)destroy;
|
||||
sig->data = data;
|
||||
int ret;
|
||||
kh_put(signalmap, my_signalmap, (uintptr_t)sig, &ret);
|
||||
return sig;
|
||||
}
|
||||
void my_signal_delete(my_signal_t* sig)
|
||||
{
|
||||
khint_t k = kh_get(signalmap, my_signalmap, (uintptr_t)sig);
|
||||
if(k!=kh_end(my_signalmap)) {
|
||||
kh_del(signalmap, my_signalmap, k);
|
||||
} else {
|
||||
printf_log(LOG_NONE, "Warning, my_signal_delete called with an unrefereced signal!\n");
|
||||
}
|
||||
uintptr_t d = sig->destroy;
|
||||
if(d) {
|
||||
RunFunction(my_context, d, 1, sig->data);
|
||||
@@ -733,6 +1018,18 @@ void my_signal_delete(my_signal_t* sig)
|
||||
printf_log(LOG_DEBUG, "gtk Data deleted, sig=%p, data=%p, destroy=%p\n", sig, sig->data, (void*)d);
|
||||
free(sig);
|
||||
}
|
||||
int my_signal_is_valid(void* sig)
|
||||
{
|
||||
khint_t k = kh_get(signalmap, my_signalmap, (uintptr_t)sig);
|
||||
if(k!=kh_end(my_signalmap)) {
|
||||
/*if(((my_signal_t*)c)->sign == SIGN)
|
||||
return 1;
|
||||
else
|
||||
printf_log(LOG_NONE, "Warning, incohrent my_signal_t structure referenced\n");*/
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int my_signal_cb(void* a, void* b, void* c, void* d)
|
||||
{
|
||||
@@ -740,26 +1037,22 @@ int my_signal_cb(void* a, void* b, void* c, void* d)
|
||||
// hopefully, no callback have more than 4 arguments...
|
||||
my_signal_t* sig = NULL;
|
||||
int i = 0;
|
||||
if(a)
|
||||
if(((my_signal_t*)a)->sign == SIGN) {
|
||||
sig = (my_signal_t*)a;
|
||||
i = 1;
|
||||
}
|
||||
if(!sig && b)
|
||||
if(((my_signal_t*)b)->sign == SIGN) {
|
||||
sig = (my_signal_t*)b;
|
||||
i = 2;
|
||||
}
|
||||
if(!sig && c)
|
||||
if(((my_signal_t*)c)->sign == SIGN) {
|
||||
sig = (my_signal_t*)c;
|
||||
i = 3;
|
||||
}
|
||||
if(!sig && d)
|
||||
if(((my_signal_t*)d)->sign == SIGN) {
|
||||
sig = (my_signal_t*)d;
|
||||
i = 4;
|
||||
}
|
||||
if(my_signal_is_valid(a)) {
|
||||
sig = (my_signal_t*)a;
|
||||
i = 1;
|
||||
}
|
||||
if(!sig && my_signal_is_valid(b)) {
|
||||
sig = (my_signal_t*)b;
|
||||
i = 2;
|
||||
}
|
||||
if(!sig && my_signal_is_valid(c)) {
|
||||
sig = (my_signal_t*)c;
|
||||
i = 3;
|
||||
}
|
||||
if(!sig && my_signal_is_valid(d)) {
|
||||
sig = (my_signal_t*)d;
|
||||
i = 4;
|
||||
}
|
||||
printf_log(LOG_DEBUG, "gtk Signal called, sig=%p, NArgs=%d\n", sig, i);
|
||||
switch(i) {
|
||||
case 1: return (int)RunFunction(my_context, sig->c_handler, 1, sig->data);
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
#() vFL
|
||||
#() vFp
|
||||
#() vFS
|
||||
#() vFG
|
||||
#() cFv
|
||||
#() cFi
|
||||
#() cFu
|
||||
#() cFf
|
||||
#() cFp
|
||||
#() cFG
|
||||
#() wFp
|
||||
#() iFE
|
||||
#() iFv
|
||||
@@ -27,13 +29,16 @@
|
||||
#() iFL
|
||||
#() iFp
|
||||
#() iFS
|
||||
#() iFG
|
||||
#() IFv
|
||||
#() IFi
|
||||
#() IFf
|
||||
#() IFd
|
||||
#() IFp
|
||||
#() IFG
|
||||
#() CFC
|
||||
#() CFp
|
||||
#() CFG
|
||||
#() WFi
|
||||
#() WFp
|
||||
#() uFE
|
||||
@@ -43,24 +48,30 @@
|
||||
#() uFU
|
||||
#() uFd
|
||||
#() uFp
|
||||
#() uFG
|
||||
#() UFv
|
||||
#() UFp
|
||||
#() UFV
|
||||
#() UFG
|
||||
#() fFi
|
||||
#() fFf
|
||||
#() fFp
|
||||
#() fFG
|
||||
#() dFv
|
||||
#() dFi
|
||||
#() dFu
|
||||
#() dFd
|
||||
#() dFp
|
||||
#() dFG
|
||||
#() lFv
|
||||
#() lFi
|
||||
#() lFl
|
||||
#() lFp
|
||||
#() lFG
|
||||
#() LFv
|
||||
#() LFu
|
||||
#() LFp
|
||||
#() LFG
|
||||
#() pFE
|
||||
#() pFv
|
||||
#() pFw
|
||||
@@ -75,6 +86,7 @@
|
||||
#() pFL
|
||||
#() pFp
|
||||
#() pFV
|
||||
#() pFG
|
||||
#() vFEp
|
||||
#() vFii
|
||||
#() vFiI
|
||||
@@ -95,7 +107,6 @@
|
||||
#() vFfp
|
||||
#() vFdd
|
||||
#() vFLp
|
||||
#() vFpc
|
||||
#() vFpi
|
||||
#() vFpI
|
||||
#() vFpC
|
||||
@@ -108,7 +119,21 @@
|
||||
#() vFpL
|
||||
#() vFpp
|
||||
#() vFpS
|
||||
#() vFpP
|
||||
#() vFpG
|
||||
#() vFSi
|
||||
#() vFGc
|
||||
#() vFGi
|
||||
#() vFGI
|
||||
#() vFGC
|
||||
#() vFGu
|
||||
#() vFGU
|
||||
#() vFGf
|
||||
#() vFGd
|
||||
#() vFGl
|
||||
#() vFGL
|
||||
#() vFGp
|
||||
#() vFGG
|
||||
#() cFpp
|
||||
#() iFEL
|
||||
#() iFEp
|
||||
@@ -137,7 +162,10 @@
|
||||
#() iFpL
|
||||
#() iFpp
|
||||
#() iFpO
|
||||
#() iFpP
|
||||
#() iFpG
|
||||
#() iFSi
|
||||
#() iFGG
|
||||
#() IFEp
|
||||
#() IFII
|
||||
#() IFpu
|
||||
@@ -197,6 +225,7 @@
|
||||
#() pFuC
|
||||
#() pFuu
|
||||
#() pFup
|
||||
#() pFuV
|
||||
#() pFUi
|
||||
#() pFdd
|
||||
#() pFlp
|
||||
@@ -210,6 +239,7 @@
|
||||
#() pFpL
|
||||
#() pFpp
|
||||
#() pFpV
|
||||
#() pFpG
|
||||
#() pFSi
|
||||
#() vFEpi
|
||||
#() vFEpu
|
||||
@@ -252,10 +282,15 @@
|
||||
#() vFpif
|
||||
#() vFpid
|
||||
#() vFpip
|
||||
#() vFpiP
|
||||
#() vFpui
|
||||
#() vFpuI
|
||||
#() vFpuu
|
||||
#() vFpup
|
||||
#() vFpUi
|
||||
#() vFpUu
|
||||
#() vFpUU
|
||||
#() vFpUp
|
||||
#() vFpff
|
||||
#() vFpdd
|
||||
#() vFpll
|
||||
@@ -264,10 +299,14 @@
|
||||
#() vFpLp
|
||||
#() vFppi
|
||||
#() vFppu
|
||||
#() vFppU
|
||||
#() vFppd
|
||||
#() vFppL
|
||||
#() vFppp
|
||||
#() vFppV
|
||||
#() vFppG
|
||||
#() vFpPp
|
||||
#() vFpPP
|
||||
#() iFEiw
|
||||
#() iFEip
|
||||
#() iFEWW
|
||||
@@ -315,7 +354,11 @@
|
||||
#() iFpuL
|
||||
#() iFpup
|
||||
#() iFpu2
|
||||
#() iFpuP
|
||||
#() iFpUi
|
||||
#() iFpUU
|
||||
#() iFpUp
|
||||
#() iFpUP
|
||||
#() iFpfu
|
||||
#() iFpff
|
||||
#() iFpdd
|
||||
@@ -334,6 +377,10 @@
|
||||
#() iFppL
|
||||
#() iFppp
|
||||
#() iFppV
|
||||
#() iFppG
|
||||
#() iFpPp
|
||||
#() iFpPP
|
||||
#() iFpGG
|
||||
#() iFSpi
|
||||
#() iFSpu
|
||||
#() IFiIi
|
||||
@@ -375,6 +422,7 @@
|
||||
#() fFppp
|
||||
#() dFddd
|
||||
#() dFddp
|
||||
#() dFpdd
|
||||
#() dFppi
|
||||
#() dFppu
|
||||
#() dFppp
|
||||
@@ -424,6 +472,7 @@
|
||||
#() pFpui
|
||||
#() pFpuu
|
||||
#() pFpup
|
||||
#() pFpuG
|
||||
#() pFpUp
|
||||
#() pFpdu
|
||||
#() pFplC
|
||||
@@ -448,6 +497,7 @@
|
||||
#() vFEpip
|
||||
#() vFEpuu
|
||||
#() vFEpup
|
||||
#() vFEpUp
|
||||
#() vFEppp
|
||||
#() vFEppV
|
||||
#() vFiiii
|
||||
@@ -496,10 +546,12 @@
|
||||
#() vFpiuu
|
||||
#() vFpiuL
|
||||
#() vFpiup
|
||||
#() vFpiUu
|
||||
#() vFpifi
|
||||
#() vFpipi
|
||||
#() vFpipu
|
||||
#() vFpipp
|
||||
#() vFpipG
|
||||
#() vFpCiW
|
||||
#() vFpuip
|
||||
#() vFpuui
|
||||
@@ -508,14 +560,23 @@
|
||||
#() vFpuuV
|
||||
#() vFpudd
|
||||
#() vFpupp
|
||||
#() vFpUui
|
||||
#() vFpUuu
|
||||
#() vFpUup
|
||||
#() vFpUUi
|
||||
#() vFpUUp
|
||||
#() vFpUpp
|
||||
#() vFpfff
|
||||
#() vFpdii
|
||||
#() vFpddd
|
||||
#() vFpLLL
|
||||
#() vFppii
|
||||
#() vFppiu
|
||||
#() vFppid
|
||||
#() vFppil
|
||||
#() vFppiL
|
||||
#() vFppip
|
||||
#() vFppiG
|
||||
#() vFppui
|
||||
#() vFppuu
|
||||
#() vFppup
|
||||
@@ -532,6 +593,8 @@
|
||||
#() vFpppL
|
||||
#() vFpppp
|
||||
#() vFpppV
|
||||
#() vFpppG
|
||||
#() vFpPpp
|
||||
#() vFSppi
|
||||
#() cFpiii
|
||||
#() iFEiip
|
||||
@@ -542,6 +605,7 @@
|
||||
#() iFEpip
|
||||
#() iFEpuu
|
||||
#() iFEpup
|
||||
#() iFEpUp
|
||||
#() iFEpLi
|
||||
#() iFEppi
|
||||
#() iFEppu
|
||||
@@ -551,6 +615,7 @@
|
||||
#() iFEpVV
|
||||
#() iFEpOu
|
||||
#() iFEpOV
|
||||
#() iFEPpp
|
||||
#() iFwwww
|
||||
#() iFwppp
|
||||
#() iFiiii
|
||||
@@ -592,6 +657,7 @@
|
||||
#() iFpipi
|
||||
#() iFpipC
|
||||
#() iFpipp
|
||||
#() iFpIip
|
||||
#() iFpCCC
|
||||
#() iFpCpi
|
||||
#() iFpWWu
|
||||
@@ -602,11 +668,16 @@
|
||||
#() iFpuui
|
||||
#() iFpuuu
|
||||
#() iFpuup
|
||||
#() iFpuUp
|
||||
#() iFpuLp
|
||||
#() iFpupi
|
||||
#() iFpupu
|
||||
#() iFpupp
|
||||
#() iFpupV
|
||||
#() iFpuPU
|
||||
#() iFpUup
|
||||
#() iFpUUU
|
||||
#() iFpUpp
|
||||
#() iFplii
|
||||
#() iFplip
|
||||
#() iFpLwp
|
||||
@@ -630,6 +701,8 @@
|
||||
#() iFpppu
|
||||
#() iFpppL
|
||||
#() iFpppp
|
||||
#() iFpPpp
|
||||
#() iFpGGi
|
||||
#() IFEpIi
|
||||
#() IFpIip
|
||||
#() IFppii
|
||||
@@ -654,6 +727,7 @@
|
||||
#() uFppiu
|
||||
#() uFppip
|
||||
#() uFppup
|
||||
#() uFppLp
|
||||
#() uFpppi
|
||||
#() uFpppp
|
||||
#() UFppii
|
||||
@@ -718,6 +792,7 @@
|
||||
#() pFppip
|
||||
#() pFppuu
|
||||
#() pFppup
|
||||
#() pFppLp
|
||||
#() pFpppi
|
||||
#() pFpppu
|
||||
#() pFpppL
|
||||
@@ -729,6 +804,7 @@
|
||||
#() vFEpupp
|
||||
#() vFEpLLp
|
||||
#() vFEppip
|
||||
#() vFEppup
|
||||
#() vFEpppp
|
||||
#() vFiiiii
|
||||
#() vFiiiiu
|
||||
@@ -792,7 +868,15 @@
|
||||
#() vFpuipp
|
||||
#() vFpuipV
|
||||
#() vFpuuuu
|
||||
#() vFpuuup
|
||||
#() vFpuupp
|
||||
#() vFpuddd
|
||||
#() vFpupup
|
||||
#() vFpUuiu
|
||||
#() vFpUUuu
|
||||
#() vFpUUup
|
||||
#() vFpUUUu
|
||||
#() vFpUUUp
|
||||
#() vFpffff
|
||||
#() vFpddii
|
||||
#() vFpdddd
|
||||
@@ -826,6 +910,7 @@
|
||||
#() iFEpipi
|
||||
#() iFEpipp
|
||||
#() iFEpupV
|
||||
#() iFEpUup
|
||||
#() iFEpLpp
|
||||
#() iFEpLpV
|
||||
#() iFEppii
|
||||
@@ -835,6 +920,7 @@
|
||||
#() iFEpppp
|
||||
#() iFEpppV
|
||||
#() iFEppVV
|
||||
#() iFEpPpp
|
||||
#() iFiiipu
|
||||
#() iFiiipp
|
||||
#() iFiiupp
|
||||
@@ -865,6 +951,7 @@
|
||||
#() iFpipip
|
||||
#() iFpippi
|
||||
#() iFpippp
|
||||
#() iFpipGp
|
||||
#() iFpCCCC
|
||||
#() iFpuiii
|
||||
#() iFpuiup
|
||||
@@ -874,6 +961,7 @@
|
||||
#() iFpuuLL
|
||||
#() iFpuupu
|
||||
#() iFpuupp
|
||||
#() iFpupiU
|
||||
#() iFpupuu
|
||||
#() iFpupup
|
||||
#() iFpuppu
|
||||
@@ -889,6 +977,7 @@
|
||||
#() iFppupi
|
||||
#() iFppupp
|
||||
#() iFppllp
|
||||
#() iFpplpp
|
||||
#() iFppLwp
|
||||
#() iFppLip
|
||||
#() iFppLpL
|
||||
@@ -902,8 +991,10 @@
|
||||
#() iFppppu
|
||||
#() iFppppL
|
||||
#() iFppppp
|
||||
#() iFpppGp
|
||||
#() IFppIII
|
||||
#() uFEippp
|
||||
#() uFEpipp
|
||||
#() uFEppuu
|
||||
#() uFEpppp
|
||||
#() uFiuuuu
|
||||
@@ -975,7 +1066,9 @@
|
||||
#() vFEpiLpp
|
||||
#() vFEpippp
|
||||
#() vFEpuipp
|
||||
#() vFEpupup
|
||||
#() vFEpLLpp
|
||||
#() vFEppupp
|
||||
#() vFEppppp
|
||||
#() vFiiiiii
|
||||
#() vFiiiuil
|
||||
@@ -1026,9 +1119,16 @@
|
||||
#() vFpipiiu
|
||||
#() vFpipipV
|
||||
#() vFpipppi
|
||||
#() vFpipppp
|
||||
#() vFpuiiiu
|
||||
#() vFpuiipp
|
||||
#() vFpuuuiu
|
||||
#() vFpuuppp
|
||||
#() vFpudddd
|
||||
#() vFpUiuup
|
||||
#() vFpUiUup
|
||||
#() vFpUipup
|
||||
#() vFpUUiup
|
||||
#() vFpdddii
|
||||
#() vFpddddd
|
||||
#() vFppiiii
|
||||
@@ -1040,9 +1140,12 @@
|
||||
#() vFppippi
|
||||
#() vFppuuuu
|
||||
#() vFppupii
|
||||
#() vFppuppp
|
||||
#() vFppdidd
|
||||
#() vFpplppi
|
||||
#() vFpplppp
|
||||
#() vFppLppi
|
||||
#() vFppLppp
|
||||
#() vFpppiii
|
||||
#() vFpppiip
|
||||
#() vFpppiff
|
||||
@@ -1053,6 +1156,7 @@
|
||||
#() vFpppppu
|
||||
#() vFpppppL
|
||||
#() vFpppppp
|
||||
#() cFppLppi
|
||||
#() iFEiippi
|
||||
#() iFEiippp
|
||||
#() iFEipuup
|
||||
@@ -1066,6 +1170,7 @@
|
||||
#() iFEpuuip
|
||||
#() iFEpuppp
|
||||
#() iFEpupVV
|
||||
#() iFEpUPpp
|
||||
#() iFEpLppp
|
||||
#() iFEppppp
|
||||
#() iFiiiiii
|
||||
@@ -1098,6 +1203,8 @@
|
||||
#() iFpuiiii
|
||||
#() iFpupipi
|
||||
#() iFpupuui
|
||||
#() iFpUUUip
|
||||
#() iFpUUUUp
|
||||
#() iFppiiip
|
||||
#() iFppiiuu
|
||||
#() iFppiipi
|
||||
@@ -1105,13 +1212,16 @@
|
||||
#() iFppipii
|
||||
#() iFppipiL
|
||||
#() iFppipip
|
||||
#() iFppIipp
|
||||
#() iFppIppp
|
||||
#() iFppuiii
|
||||
#() iFppuiiu
|
||||
#() iFppuipp
|
||||
#() iFppuIII
|
||||
#() iFppuupp
|
||||
#() iFppupip
|
||||
#() iFppuppp
|
||||
#() iFppUipp
|
||||
#() iFppUupp
|
||||
#() iFppdidd
|
||||
#() iFpplppi
|
||||
@@ -1129,6 +1239,7 @@
|
||||
#() iFpppppu
|
||||
#() iFpppppp
|
||||
#() uFEiippp
|
||||
#() uFEiuppp
|
||||
#() uFpippup
|
||||
#() uFppippp
|
||||
#() uFpppppp
|
||||
@@ -1157,6 +1268,7 @@
|
||||
#() pFpuuuuu
|
||||
#() pFplpppp
|
||||
#() pFppiiii
|
||||
#() pFppiipp
|
||||
#() pFppippp
|
||||
#() pFpppiii
|
||||
#() pFpppiui
|
||||
@@ -1166,6 +1278,7 @@
|
||||
#() pFpppppp
|
||||
#() pFSpiiii
|
||||
#() vFEpipppp
|
||||
#() vFEpuipuV
|
||||
#() vFiiiiiip
|
||||
#() vFiiiiuup
|
||||
#() vFiiupuip
|
||||
@@ -1205,6 +1318,10 @@
|
||||
#() vFpiiliip
|
||||
#() vFpiipCpp
|
||||
#() vFpipipii
|
||||
#() vFpipppii
|
||||
#() vFpuuuuuu
|
||||
#() vFpuuUUuu
|
||||
#() vFpUiUiup
|
||||
#() vFpddiidd
|
||||
#() vFpdddddd
|
||||
#() vFppiiiii
|
||||
@@ -1217,15 +1334,22 @@
|
||||
#() vFppipiip
|
||||
#() vFppipipp
|
||||
#() vFppipppp
|
||||
#() vFppLpppi
|
||||
#() vFppLpppp
|
||||
#() vFpppiiii
|
||||
#() vFpppiipi
|
||||
#() vFpppiipp
|
||||
#() vFpppippi
|
||||
#() vFpppuuuu
|
||||
#() vFppppiii
|
||||
#() vFppppiip
|
||||
#() vFppppipi
|
||||
#() vFpppppip
|
||||
#() vFppppppi
|
||||
#() vFppppppp
|
||||
#() iFEpuiupV
|
||||
#() iFEpupppp
|
||||
#() iFEpUuppp
|
||||
#() iFEppiuui
|
||||
#() iFEppupIi
|
||||
#() iFEppuppp
|
||||
@@ -1234,6 +1358,7 @@
|
||||
#() iFiiiiiip
|
||||
#() iFiuppppp
|
||||
#() iFpiiiiii
|
||||
#() iFpiiiiip
|
||||
#() iFpiiiLwp
|
||||
#() iFpiiuuiu
|
||||
#() iFpiiuuuu
|
||||
@@ -1259,10 +1384,12 @@
|
||||
#() iFppiipiL
|
||||
#() iFppipiip
|
||||
#() iFppipipi
|
||||
#() iFppipipp
|
||||
#() iFppippip
|
||||
#() iFppipppi
|
||||
#() iFppipppp
|
||||
#() iFppuipiL
|
||||
#() iFppLiipp
|
||||
#() iFpppiiii
|
||||
#() iFpppiiuu
|
||||
#() iFpppiiup
|
||||
@@ -1275,7 +1402,9 @@
|
||||
#() iFppppdpi
|
||||
#() iFpppppip
|
||||
#() iFpppppup
|
||||
#() iFppppppi
|
||||
#() iFppppppp
|
||||
#() uFEpiippp
|
||||
#() uFuippppp
|
||||
#() LFEpppppu
|
||||
#() pFEpLiiii
|
||||
@@ -1295,6 +1424,8 @@
|
||||
#() pFppiippp
|
||||
#() pFppipipp
|
||||
#() pFppuuppp
|
||||
#() pFppLiiip
|
||||
#() pFppLipip
|
||||
#() pFpppccci
|
||||
#() pFpppiiii
|
||||
#() pFpppiipp
|
||||
@@ -1309,6 +1440,7 @@
|
||||
#() pFpppLLLi
|
||||
#() pFppppuuu
|
||||
#() pFpppppuu
|
||||
#() pFppppppi
|
||||
#() pFppppppp
|
||||
#() vFEiippppV
|
||||
#() vFEiupippp
|
||||
@@ -1339,10 +1471,15 @@
|
||||
#() vFffffffff
|
||||
#() vFpiiiiiii
|
||||
#() vFpiiiipii
|
||||
#() vFpiiULipp
|
||||
#() vFpiUuupup
|
||||
#() vFpippiiuu
|
||||
#() vFpippiipi
|
||||
#() vFpUiUiupi
|
||||
#() vFpUuuUUUi
|
||||
#() vFppiiiiii
|
||||
#() vFppiiipii
|
||||
#() vFppipipii
|
||||
#() vFppipppui
|
||||
#() vFppippppi
|
||||
#() vFppippppp
|
||||
@@ -1368,6 +1505,7 @@
|
||||
#() iFpuippupp
|
||||
#() iFpuuiiiii
|
||||
#() iFpupppppp
|
||||
#() iFpUuuLpUi
|
||||
#() iFppiiiiiu
|
||||
#() iFppIIIppp
|
||||
#() iFpppiippp
|
||||
@@ -1403,6 +1541,7 @@
|
||||
#() pFppiiiiii
|
||||
#() pFpppuuuuu
|
||||
#() pFpppppupp
|
||||
#() vFEpiiiiipp
|
||||
#() vFEppiipppp
|
||||
#() vFEpppiippp
|
||||
#() vFuiiiiiiii
|
||||
@@ -1450,6 +1589,7 @@
|
||||
#() iFppiiiiiii
|
||||
#() iFppiuiippu
|
||||
#() iFppipiiipi
|
||||
#() iFppLpiippp
|
||||
#() iFpppiiuuii
|
||||
#() iFpppiipiiu
|
||||
#() iFppppupiii
|
||||
@@ -1521,6 +1661,7 @@
|
||||
#() pFEppCuuuCup
|
||||
#() pFplllllllll
|
||||
#() pFppuiipuuii
|
||||
#() vFEpiiiupupup
|
||||
#() vFiippppppppp
|
||||
#() vFuiiiiiiiiip
|
||||
#() vFuiiiiiiiuip
|
||||
@@ -1534,6 +1675,7 @@
|
||||
#() vFuffffffffff
|
||||
#() vFpipipiipiii
|
||||
#() vFpipppiiiipi
|
||||
#() vFpupiiuPuPuP
|
||||
#() vFppiiiiiiiii
|
||||
#() vFppiiiiipiii
|
||||
#() vFppiiiiddddi
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -4,6 +4,7 @@
|
||||
#ifndef __WRAPPER_H_
|
||||
#define __WRAPPER_H_
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct x86emu_s x86emu_t;
|
||||
|
||||
@@ -24,6 +25,8 @@ typedef void (*wrapper_t)(x86emu_t* emu, uintptr_t fnc);
|
||||
// S = _IO_2_1_stdXXX_ pointer (or FILE*)
|
||||
// Q = ...
|
||||
// 2 = struct of 2 uint
|
||||
// P = Vulkan struture pointer
|
||||
// G = a single GValue pointer
|
||||
|
||||
void iF(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFE(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -35,11 +38,13 @@ void vFd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFS(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFv(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFi(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFu(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFf(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void wFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFE(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFv(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -54,13 +59,16 @@ void iFd(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFS(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFv(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFi(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFf(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFd(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void CFC(x86emu_t *emu, uintptr_t fnc);
|
||||
void CFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void CFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void WFi(x86emu_t *emu, uintptr_t fnc);
|
||||
void WFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFE(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -70,24 +78,30 @@ void uFu(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFU(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFd(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void UFv(x86emu_t *emu, uintptr_t fnc);
|
||||
void UFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void UFV(x86emu_t *emu, uintptr_t fnc);
|
||||
void UFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void fFi(x86emu_t *emu, uintptr_t fnc);
|
||||
void fFf(x86emu_t *emu, uintptr_t fnc);
|
||||
void fFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void fFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFv(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFi(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFu(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFd(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void lFv(x86emu_t *emu, uintptr_t fnc);
|
||||
void lFi(x86emu_t *emu, uintptr_t fnc);
|
||||
void lFl(x86emu_t *emu, uintptr_t fnc);
|
||||
void lFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void lFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void LFv(x86emu_t *emu, uintptr_t fnc);
|
||||
void LFu(x86emu_t *emu, uintptr_t fnc);
|
||||
void LFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void LFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFE(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFv(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFw(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -102,6 +116,7 @@ void pFl(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFL(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFV(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFG(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiI(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -122,7 +137,6 @@ void vFff(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFfp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFdd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFLp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpc(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpI(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpC(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -135,7 +149,21 @@ void vFpl(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpS(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpP(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpG(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFSi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGc(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGI(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGC(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGU(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGf(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGl(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFGG(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -164,7 +192,10 @@ void iFpl(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpO(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpP(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpG(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFSi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFGG(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFEp(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFII(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFpu(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -224,6 +255,7 @@ void pFui(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFuC(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFup(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFuV(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFUi(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFdd(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFlp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -237,6 +269,7 @@ void pFpl(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpL(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpV(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpG(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFSi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpu(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -279,10 +312,15 @@ void vFpiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpif(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpid(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiP(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpui(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuI(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUU(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpff(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpdd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpll(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -291,10 +329,14 @@ void vFpLL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpLp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppU(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppV(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppG(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpPp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpPP(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEiw(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEWW(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -342,7 +384,11 @@ void iFpuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpu2(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuP(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUU(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUP(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpfu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpff(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpdd(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -361,6 +407,10 @@ void iFppl(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppG(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpPp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpPP(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpGG(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFSpi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFSpu(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFiIi(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -402,6 +452,7 @@ void fFppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void fFppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFddd(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFddp(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFpdd(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void dFppp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -451,6 +502,7 @@ void pFpWW(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpui(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpup(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpuG(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpdu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFplC(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -475,6 +527,7 @@ void vFEpiL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEppV(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -523,10 +576,12 @@ void vFpiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiuL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiUu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpifi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipG(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpCiW(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuui(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -535,14 +590,23 @@ void vFpuup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuuV(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpudd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUui(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUUi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpfff(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpdii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpddd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpLLL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppid(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppil(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiG(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppui(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppup(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -559,6 +623,8 @@ void vFpppd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppV(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppG(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpPpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFSppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFpiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEiip(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -569,6 +635,7 @@ void iFEpii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpLi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEppu(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -578,6 +645,7 @@ void iFEppV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpVV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpOu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpOV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEPpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFwwww(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFwppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -619,6 +687,7 @@ void iFpild(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpipC(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpIip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpCCC(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpCpi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpWWu(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -629,11 +698,16 @@ void iFpuip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuui(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuLp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuPU(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUUU(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFplii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFplip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpLwp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -657,6 +731,8 @@ void iFpppC(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpPpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpGGi(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFEpIi(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFpIip(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFppii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -681,6 +757,7 @@ void uFpupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFppiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFppip(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFppup(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFppLp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFpppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFpppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void UFppii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -745,6 +822,7 @@ void pFppiL(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppip(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppup(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppLp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppL(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -756,6 +834,7 @@ void vFEpuup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpLLp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEppip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEppup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiiiiu(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -819,7 +898,15 @@ void vFpuiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuipV(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuuup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuddd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpupup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUuiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUUuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUUup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUUUu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUUUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpffff(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpddii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpdddd(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -853,6 +940,7 @@ void iFEpiup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpupV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpUup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpLpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpLpV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEppii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -862,6 +950,7 @@ void iFEpplp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpppV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEppVV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpPpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFiiipu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFiiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFiiupp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -892,6 +981,7 @@ void iFpipiL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpipip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpippi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpipGp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpCCCC(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuiup(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -901,6 +991,7 @@ void iFpuuup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuuLL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuupu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupiU(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuppu(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -916,6 +1007,7 @@ void iFppipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppupi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppllp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpplpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppLwp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppLip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppLpL(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -929,8 +1021,10 @@ void iFppppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppppL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppGp(x86emu_t *emu, uintptr_t fnc);
|
||||
void IFppIII(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFEippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFEpipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFEppuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFEpppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFiuuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1002,7 +1096,9 @@ void vFEiiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpiLpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpuipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpupup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpLLpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEppupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiiiuil(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1053,9 +1149,16 @@ void vFpiippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipiiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipipV(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuiiiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuuuiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpudddd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUiuup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUiUup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUipup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUUiup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpdddii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpddddd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1067,9 +1170,12 @@ void vFppilpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppippi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppuuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppupii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppdidd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpplppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpplppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppLppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppLppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppiff(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1080,6 +1186,7 @@ void vFpppppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppppL(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void cFppLppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEiippi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEiippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEipuup(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1093,6 +1200,7 @@ void iFEpipVV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpuuip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpupVV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpUPpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpLppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1125,6 +1233,8 @@ void iFpCpipu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupuui(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUUUip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUUUUp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppiiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppiiuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppiipi(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1132,13 +1242,16 @@ void iFppiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipiL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppIipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppIppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppuiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppuiiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppuipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppuIII(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppuupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppupip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppUipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppUupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppdidd(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpplppi(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1156,6 +1269,7 @@ void iFpppppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFEiippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFEiuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFpippup(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFppippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFpppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1184,6 +1298,7 @@ void pFpippip(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpuuuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFplpppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppiui(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1193,6 +1308,7 @@ void pFpppppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFSpiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpipppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpuipuV(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiiiiiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiiiiuup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiiupuip(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1232,6 +1348,10 @@ void vFpiiiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiiliip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiipCpp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipipii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipppii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuuuuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpuuUUuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUiUiup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpddiidd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpdddddd(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1244,15 +1364,22 @@ void vFppilppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppipiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppipipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppipppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppLpppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppLpppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppiipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppippi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppuuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppppiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppppiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppppipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpppppip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppppppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpuiupV(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpupppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEpUuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEppiuui(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEppupIi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFEppuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1261,6 +1388,7 @@ void iFEpppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFiiiiiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFiuppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpiiiiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpiiiLwp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpiiuuiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpiiuuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1286,10 +1414,12 @@ void iFppiipii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppiipiL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppippip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppuipiL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppLiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppiiuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppiiup(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1302,7 +1432,9 @@ void iFppppiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppppdpi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppppip(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppppup(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppppppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFEpiippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void uFuippppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void LFEpppppu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFEpLiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1322,6 +1454,8 @@ void pFppiiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppiippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppipipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppuuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppLiiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppLipip(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppccci(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1336,6 +1470,7 @@ void pFpppllli(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppLLLi(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppppuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppppuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppppppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEiippppV(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEiupippp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1366,10 +1501,15 @@ void vFuuuuufff(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFffffffff(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiiiipii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiiULipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpiUuupup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpippiiuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpippiipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUiUiupi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpUuuUUUi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiiipii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppipipii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppipppui(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppippppi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppippppp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1395,6 +1535,7 @@ void iFpuipuppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuippupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpuuiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpupppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpUuuLpUi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppiiiiiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppIIIppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppiippp(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1430,6 +1571,7 @@ void pFplpppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppuuuuu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFpppppupp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpiiiiipp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEppiipppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpppiippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFuiiiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1477,6 +1619,7 @@ void iFpLLLLLLLL(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppiiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppiuiippu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppipiiipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppLpiippp(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppiiuuii(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFpppiipiiu(x86emu_t *emu, uintptr_t fnc);
|
||||
void iFppppupiii(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1548,6 +1691,7 @@ void pFEppCuwwWWu(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFEppCuuuCup(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFplllllllll(x86emu_t *emu, uintptr_t fnc);
|
||||
void pFppuiipuuii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFEpiiiupupup(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFiippppppppp(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFuiiiiiiiiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFuiiiiiiiuip(x86emu_t *emu, uintptr_t fnc);
|
||||
@@ -1561,6 +1705,7 @@ void vFuuddiiddiip(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFuffffffffff(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipipiipiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpipppiiiipi(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFpupiiuPuPuP(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiiiiiiiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiiiiipiii(x86emu_t *emu, uintptr_t fnc);
|
||||
void vFppiiiiddddi(x86emu_t *emu, uintptr_t fnc);
|
||||
|
||||
@@ -19,8 +19,8 @@ GO(app_indicator_get_secondary_activate_target, pFp)
|
||||
GO(app_indicator_get_status, iFp)
|
||||
GO(app_indicator_get_title, pFp)
|
||||
GO(app_indicator_get_type, iFv)
|
||||
GO(app_indicator_new, pFp)
|
||||
GO(app_indicator_new_with_path, pFp)
|
||||
GO(app_indicator_new, pFppi)
|
||||
GO(app_indicator_new_with_path, pFppip)
|
||||
GO(app_indicator_set_attention_icon, vFpp)
|
||||
GO(app_indicator_set_attention_icon_full, vFppp)
|
||||
GO(app_indicator_set_icon, vFpp)
|
||||
|
||||
@@ -40,7 +40,7 @@ GO(cairo_device_to_user_distance, vFppp)
|
||||
GO(cairo_fill, vFp)
|
||||
GO(cairo_fill_extents, vFppppp)
|
||||
GO(cairo_fill_preserve, vFp)
|
||||
//GO(cairo_font_extents,
|
||||
GO(cairo_font_extents, vFpp)
|
||||
//GO(cairo_font_face_destroy,
|
||||
//GO(cairo_font_face_get_reference_count,
|
||||
//GO(cairo_font_face_get_type,
|
||||
@@ -64,22 +64,22 @@ GO(cairo_font_options_set_hint_style, vFpi)
|
||||
GO(cairo_font_options_set_subpixel_order, vFpi)
|
||||
GO(cairo_font_options_status, iFp)
|
||||
GO(cairo_format_stride_for_width, iFii)
|
||||
//GO(cairo_ft_font_face_create_for_ft_face,
|
||||
//GO(cairo_ft_font_face_create_for_pattern,
|
||||
//GO(cairo_ft_font_face_get_synthesize,
|
||||
//GO(cairo_ft_font_face_set_synthesize,
|
||||
//GO(cairo_ft_font_face_unset_synthesize,
|
||||
//GO(cairo_ft_font_options_substitute,
|
||||
//GO(cairo_ft_scaled_font_lock_face,
|
||||
//GO(cairo_ft_scaled_font_unlock_face,
|
||||
GO(cairo_ft_font_face_create_for_ft_face, pFpi)
|
||||
GO(cairo_ft_font_face_create_for_pattern, pFp)
|
||||
GO(cairo_ft_font_face_get_synthesize, uFp)
|
||||
GO(cairo_ft_font_face_set_synthesize, vFpu)
|
||||
GO(cairo_ft_font_face_unset_synthesize, vFpu)
|
||||
GO(cairo_ft_font_options_substitute, vFpp)
|
||||
GO(cairo_ft_scaled_font_lock_face, pFp)
|
||||
GO(cairo_ft_scaled_font_unlock_face, vFp)
|
||||
GO(cairo_get_antialias, iFp)
|
||||
GO(cairo_get_current_point, vFppp)
|
||||
GO(cairo_get_dash, vFppp)
|
||||
GO(cairo_get_dash_count, iFp)
|
||||
GO(cairo_get_fill_rule, iFp)
|
||||
//GO(cairo_get_font_face,
|
||||
//GO(cairo_get_font_matrix,
|
||||
//GO(cairo_get_font_options,
|
||||
GO(cairo_get_font_face, pFp)
|
||||
GO(cairo_get_font_matrix, vFpp)
|
||||
GO(cairo_get_font_options, vFpp)
|
||||
GO(cairo_get_group_target, pFp)
|
||||
GO(cairo_get_line_cap, iFp)
|
||||
GO(cairo_get_line_join, iFp)
|
||||
@@ -88,14 +88,14 @@ GO(cairo_get_matrix, vFpp)
|
||||
GO(cairo_get_miter_limit, dFp)
|
||||
GO(cairo_get_operator, iFp)
|
||||
GO(cairo_get_reference_count, uFp)
|
||||
//GO(cairo_get_scaled_font,
|
||||
GO(cairo_get_scaled_font, pFp)
|
||||
GO(cairo_get_source, pFp)
|
||||
GO(cairo_get_target, pFp)
|
||||
GO(cairo_get_tolerance, dFp)
|
||||
GO(cairo_get_user_data, pFpp)
|
||||
//GO(cairo_glyph_allocate,
|
||||
//GO(cairo_glyph_extents,
|
||||
//GO(cairo_glyph_free,
|
||||
GO(cairo_glyph_allocate, pFi)
|
||||
GO(cairo_glyph_extents, vFppip)
|
||||
GO(cairo_glyph_free, vFp)
|
||||
GO(cairo_glyph_path, vFppi)
|
||||
GO(cairo_has_current_point, iFp)
|
||||
GO(cairo_identity_matrix, vFp)
|
||||
@@ -266,31 +266,31 @@ GO(cairo_scale, vFpdd)
|
||||
//GO(cairo_script_surface_create,
|
||||
//GO(cairo_script_surface_create_for_target,
|
||||
//GO(cairo_script_write_comment,
|
||||
//GO(cairo_select_font_face,
|
||||
GO(cairo_select_font_face, vFppii)
|
||||
GO(cairo_set_antialias, vFpi)
|
||||
GO(cairo_set_dash, vFppid)
|
||||
GO(cairo_set_fill_rule, vFpi)
|
||||
//GO(cairo_set_font_face,
|
||||
//GO(cairo_set_font_matrix,
|
||||
//GO(cairo_set_font_options,
|
||||
//GO(cairo_set_font_size,
|
||||
GO(cairo_set_font_face, vFpp)
|
||||
GO(cairo_set_font_matrix, vFpp)
|
||||
GO(cairo_set_font_options, vFpp)
|
||||
GO(cairo_set_font_size, vFpd)
|
||||
GO(cairo_set_line_cap, vFpi)
|
||||
GO(cairo_set_line_join, vFpi)
|
||||
GO(cairo_set_line_width, vFpd)
|
||||
GO(cairo_set_matrix, vFpp)
|
||||
GO(cairo_set_miter_limit, vFpd)
|
||||
GO(cairo_set_operator, vFpi)
|
||||
//GO(cairo_set_scaled_font,
|
||||
GO(cairo_set_scaled_font, vFpp)
|
||||
GO(cairo_set_source, vFpp)
|
||||
GO(cairo_set_source_rgb, vFpddd)
|
||||
GO(cairo_set_source_rgba, vFpdddd)
|
||||
GO(cairo_set_source_surface, vFppdd)
|
||||
GO(cairo_set_tolerance, vFpd)
|
||||
//GOM(cairo_set_user_data, iFEpppp)
|
||||
//GO(cairo_show_glyphs,
|
||||
GO(cairo_show_glyphs, vFppi)
|
||||
GO(cairo_show_page, vFp)
|
||||
//GO(cairo_show_text,
|
||||
//GO(cairo_show_text_glyphs,
|
||||
GO(cairo_show_text, vFpp)
|
||||
GO(cairo_show_text_glyphs, vFppipipii)
|
||||
GO(cairo_status, iFp)
|
||||
//GO(cairo_status_to_string,
|
||||
GO(cairo_stroke, vFp)
|
||||
@@ -344,14 +344,14 @@ GO(cairo_surface_unmap_image, vFpp)
|
||||
//GO(cairo_svg_surface_create_for_stream,
|
||||
//GO(cairo_svg_surface_restrict_to_version,
|
||||
//GO(cairo_svg_version_to_string,
|
||||
//GO(cairo_text_cluster_allocate,
|
||||
//GO(cairo_text_cluster_free,
|
||||
//GO(cairo_text_extents,
|
||||
GO(cairo_text_cluster_allocate, pFi)
|
||||
GO(cairo_text_cluster_free, vFp)
|
||||
GO(cairo_text_extents, vFppp)
|
||||
GO(cairo_text_path, vFpp)
|
||||
//GO(cairo_toy_font_face_create,
|
||||
//GO(cairo_toy_font_face_get_family,
|
||||
//GO(cairo_toy_font_face_get_slant,
|
||||
//GO(cairo_toy_font_face_get_weight,
|
||||
GO(cairo_toy_font_face_create, pFpii)
|
||||
GO(cairo_toy_font_face_get_family, pFp)
|
||||
GO(cairo_toy_font_face_get_slant, iFp)
|
||||
GO(cairo_toy_font_face_get_weight, iFp)
|
||||
GO(cairo_transform, vFpp)
|
||||
GO(cairo_translate, vFpdd)
|
||||
//GO(cairo_user_font_face_create,
|
||||
|
||||
@@ -12,29 +12,29 @@
|
||||
//GO(a2i_IPADDRESS_NC,
|
||||
//GO(ACCESS_DESCRIPTION_free,
|
||||
//GO(ACCESS_DESCRIPTION_new,
|
||||
//GO(AES_bi_ige_encrypt,
|
||||
//GO(AES_cbc_encrypt,
|
||||
//GO(AES_cfb128_encrypt,
|
||||
//GO(AES_cfb1_encrypt,
|
||||
//GO(AES_cfb8_encrypt,
|
||||
//GO(AES_ctr128_encrypt,
|
||||
//GO(AES_decrypt,
|
||||
//GO(AES_ecb_encrypt,
|
||||
//GO(AES_encrypt,
|
||||
//GO(AES_ige_encrypt,
|
||||
//GO(AES_ofb128_encrypt,
|
||||
GO(AES_bi_ige_encrypt, vFppLpppi)
|
||||
GO(AES_cbc_encrypt, vFppLppi)
|
||||
GO(AES_cfb128_encrypt, vFppLpppi)
|
||||
GO(AES_cfb1_encrypt, vFppLpppi)
|
||||
GO(AES_cfb8_encrypt, vFppLpppi)
|
||||
GO(AES_ctr128_encrypt, vFppLpppp)
|
||||
GO(AES_decrypt, vFppp)
|
||||
GO(AES_ecb_encrypt, vFpppi)
|
||||
GO(AES_encrypt, vFppp)
|
||||
GO(AES_ige_encrypt, cFppLppi)
|
||||
GO(AES_ofb128_encrypt, vFppLppp)
|
||||
//GO(AES_options,
|
||||
//GO(AES_set_decrypt_key,
|
||||
GO(AES_set_decrypt_key, iFpip)
|
||||
//GO(AES_set_enc2dec_key,
|
||||
//GO(AES_set_encrypt_key,
|
||||
//GO(AES_unwrap_key,
|
||||
GO(AES_set_encrypt_key, iFpip)
|
||||
GO(AES_unwrap_key, iFppppi)
|
||||
//GO(aes_v8_cbc_encrypt,
|
||||
//GO(aes_v8_ctr32_encrypt_blocks,
|
||||
//GO(aes_v8_decrypt,
|
||||
//GO(aes_v8_encrypt,
|
||||
//GO(aes_v8_set_decrypt_key,
|
||||
//GO(aes_v8_set_encrypt_key,
|
||||
//GO(AES_wrap_key,
|
||||
GO(AES_wrap_key, iFppppi)
|
||||
//GO(_armv7_neon_probe,
|
||||
//GO(_armv7_tick,
|
||||
//GO(_armv8_aes_probe,
|
||||
@@ -461,6 +461,7 @@ GO(BN_is_bit_set, iFpi)
|
||||
//GO(BN_is_prime_ex,
|
||||
//GO(BN_is_prime_fasttest,
|
||||
//GO(BN_is_prime_fasttest_ex,
|
||||
GO(BN_is_zero, iFp)
|
||||
//GO(BN_kronecker,
|
||||
GO(BN_lshift, iFppi)
|
||||
GO(BN_lshift1, iFpp)
|
||||
@@ -516,6 +517,7 @@ GO(BN_new, pFv)
|
||||
GO(BN_nnmod, iFpppp)
|
||||
GO(BN_num_bits, iFp)
|
||||
GO(BN_num_bits_word, iFu)
|
||||
GO(BN_one, iFp)
|
||||
//GO(BN_options,
|
||||
GO(BN_print, iFpp)
|
||||
GO(BN_print_fp, iFpp)
|
||||
@@ -533,7 +535,7 @@ GO(BN_rshift1, iFpp)
|
||||
GO(BN_set_bit, iFpi)
|
||||
GO(BN_set_negative, vFpi)
|
||||
//GO(BN_set_params,
|
||||
//GO(BN_set_word,
|
||||
GO(BN_set_word, iFpu)
|
||||
GO(BN_sqr, iFppp)
|
||||
//GO(bn_sqr_comba4,
|
||||
//GO(bn_sqr_comba8,
|
||||
@@ -554,6 +556,7 @@ GO(BN_value_one, pFv)
|
||||
//GO(BN_X931_derive_prime_ex,
|
||||
//GO(BN_X931_generate_prime_ex,
|
||||
//GO(BN_X931_generate_Xpq,
|
||||
GO(BN_zero, vFp)
|
||||
//GO(bsaes_cbc_encrypt,
|
||||
//GO(bsaes_ctr32_encrypt_blocks,
|
||||
//GO(bsaes_xts_decrypt,
|
||||
@@ -1252,8 +1255,8 @@ GO(EC_curve_nist2nid, iFp)
|
||||
//GO(ECDH_set_method,
|
||||
//GO(ecdsa_check,
|
||||
//GO(ECDSA_do_sign,
|
||||
//GO(ECDSA_do_sign_ex,
|
||||
//GO(ECDSA_do_verify,
|
||||
GO(ECDSA_do_sign_ex, pFpippp)
|
||||
GO(ECDSA_do_verify, iFpipp)
|
||||
//GO(ECDSA_get_default_method,
|
||||
//GO(ECDSA_get_ex_data,
|
||||
//GO(ECDSA_get_ex_new_index,
|
||||
@@ -1270,11 +1273,13 @@ GO(EC_curve_nist2nid, iFp)
|
||||
//GO(ECDSA_set_default_method,
|
||||
//GO(ECDSA_set_ex_data,
|
||||
//GO(ECDSA_set_method,
|
||||
//GO(ECDSA_SIG_free,
|
||||
GO(ECDSA_SIG_free, vFp)
|
||||
//GO(ECDSA_sign,
|
||||
//GO(ECDSA_SIG_new,
|
||||
GO(ECDSA_SIG_get0, vFppp)
|
||||
GO(ECDSA_SIG_new, pFv)
|
||||
GO(ECDSA_SIG_set0, iFppp)
|
||||
//GO(ECDSA_sign_ex,
|
||||
//GO(ECDSA_sign_setup,
|
||||
GO(ECDSA_sign_setup, iFpppp)
|
||||
//GO(ECDSA_size,
|
||||
//GO(ECDSA_verify,
|
||||
//GO(EC_EX_DATA_clear_free_all_data,
|
||||
@@ -1304,7 +1309,7 @@ GO(EC_get_builtin_curves, LFpL)
|
||||
//GO(ec_GF2m_simple_is_at_infinity,
|
||||
//GO(ec_GF2m_simple_is_on_curve,
|
||||
//GO(ec_GF2m_simple_make_affine,
|
||||
//GO(EC_GF2m_simple_method,
|
||||
GO(EC_GF2m_simple_method, pFv)
|
||||
//GO(ec_GF2m_simple_mul,
|
||||
//GO(ec_GF2m_simple_oct2point,
|
||||
//GO(ec_GF2m_simple_point2oct,
|
||||
@@ -1327,12 +1332,15 @@ GO(EC_get_builtin_curves, LFpL)
|
||||
//GO(ec_GFp_mont_group_finish,
|
||||
//GO(ec_GFp_mont_group_init,
|
||||
//GO(ec_GFp_mont_group_set_curve,
|
||||
//GO(EC_GFp_mont_method,
|
||||
GO(EC_GFp_mont_method, pFv)
|
||||
//GO(ec_GFp_nist_field_mul,
|
||||
//GO(ec_GFp_nist_field_sqr,
|
||||
//GO(ec_GFp_nist_group_copy,
|
||||
//GO(ec_GFp_nist_group_set_curve,
|
||||
//GO(EC_GFp_nist_method,
|
||||
GO(EC_GFp_nist_method, pFv)
|
||||
GO(EC_GFp_nistp224_method, pFv)
|
||||
GO(EC_GFp_nistp256_method, pFv)
|
||||
GO(EC_GFp_nistp521_method, pFv)
|
||||
//GO(ec_GFp_simple_add,
|
||||
//GO(ec_GFp_simple_cmp,
|
||||
//GO(ec_GFp_simple_dbl,
|
||||
@@ -1351,7 +1359,7 @@ GO(EC_get_builtin_curves, LFpL)
|
||||
//GO(ec_GFp_simple_is_at_infinity,
|
||||
//GO(ec_GFp_simple_is_on_curve,
|
||||
//GO(ec_GFp_simple_make_affine,
|
||||
//GO(EC_GFp_simple_method,
|
||||
GO(EC_GFp_simple_method, pFv)
|
||||
//GO(ec_GFp_simple_oct2point,
|
||||
//GO(ec_GFp_simple_point2oct,
|
||||
//GO(ec_GFp_simple_point_clear_finish,
|
||||
@@ -1366,38 +1374,42 @@ GO(EC_get_builtin_curves, LFpL)
|
||||
//GO(ec_GFp_simple_set_Jprojective_coordinates_GFp,
|
||||
//GO(EC_GROUP_check,
|
||||
//GO(EC_GROUP_check_discriminant,
|
||||
//GO(EC_GROUP_clear_free,
|
||||
GO(EC_GROUP_clear_free, vFp)
|
||||
//GO(EC_GROUP_cmp,
|
||||
//GO(EC_GROUP_copy,
|
||||
//GO(EC_GROUP_dup,
|
||||
//GO(EC_GROUP_free,
|
||||
//GO(EC_GROUP_get0_generator,
|
||||
GO(EC_GROUP_free, vFp)
|
||||
GO(EC_GROUP_get0_generator, pFp)
|
||||
//GO(EC_GROUP_get0_seed,
|
||||
//GO(EC_GROUP_get_asn1_flag,
|
||||
//GO(EC_GROUP_get_basis_type,
|
||||
//GO(EC_GROUP_get_cofactor,
|
||||
//GO(EC_GROUP_get_curve_GF2m,
|
||||
//GO(EC_GROUP_get_curve_GFp,
|
||||
GO(EC_GROUP_get_curve_GF2m, iFppppp)
|
||||
GO(EC_GROUP_get_curve_GFp, iFppppp)
|
||||
//GO(EC_GROUP_get_curve_name,
|
||||
GO(EC_GROUP_get_degree, iFp)
|
||||
GO(EC_GROUP_get_ecparameters, pFpp)
|
||||
GO(EC_GROUP_get_ecpkparameters, pFpp)
|
||||
//GO(EC_GROUP_get_mont_data,
|
||||
//GO(EC_GROUP_get_order,
|
||||
GO(EC_GROUP_get_order, iFppp)
|
||||
//GO(EC_GROUP_get_pentanomial_basis,
|
||||
//GO(EC_GROUP_get_point_conversion_form,
|
||||
//GO(EC_GROUP_get_seed_len,
|
||||
//GO(EC_GROUP_get_trinomial_basis,
|
||||
//GO(EC_GROUP_have_precompute_mult,
|
||||
//GO(EC_GROUP_method_of,
|
||||
//GO(EC_GROUP_new,
|
||||
//GO(EC_GROUP_new_by_curve_name,
|
||||
//GO(EC_GROUP_new_curve_GF2m,
|
||||
//GO(EC_GROUP_new_curve_GFp,
|
||||
//GO(EC_GROUP_precompute_mult,
|
||||
GO(EC_GROUP_new, pFp)
|
||||
GO(EC_GROUP_new_by_curve_name, pFi)
|
||||
GO(EC_GROUP_new_curve_GF2m, pFpppp)
|
||||
GO(EC_GROUP_new_curve_GFp, pFpppp)
|
||||
GO(EC_GROUP_new_from_ecparameters, pFp)
|
||||
GO(EC_GROUP_new_from_ecpkparameters, pFp)
|
||||
GO(EC_GROUP_precompute_mult, iFpp)
|
||||
//GO(EC_GROUP_set_asn1_flag,
|
||||
//GO(EC_GROUP_set_curve_GF2m,
|
||||
//GO(EC_GROUP_set_curve_GFp,
|
||||
GO(EC_GROUP_set_curve_GF2m, iFppppp)
|
||||
GO(EC_GROUP_set_curve_GFp, iFppppp)
|
||||
//GO(EC_GROUP_set_curve_name,
|
||||
//GO(EC_GROUP_set_generator,
|
||||
GO(EC_GROUP_set_generator, iFpppp)
|
||||
//GO(EC_GROUP_set_point_conversion_form,
|
||||
//GO(EC_GROUP_set_seed,
|
||||
//GO(EC_KEY_check_key,
|
||||
@@ -1414,7 +1426,7 @@ GO(EC_KEY_get0_group, pFp)
|
||||
//GO(EC_KEY_get_flags,
|
||||
//GO(EC_KEY_get_key_method_data,
|
||||
//GO(EC_KEY_insert_key_method_data,
|
||||
//GO(EC_KEY_new,
|
||||
GO(EC_KEY_new, pFv)
|
||||
GO(EC_KEY_new_by_curve_name, pFi)
|
||||
//GO(EC_KEY_precompute_mult,
|
||||
//GO(EC_KEY_print,
|
||||
@@ -1423,12 +1435,12 @@ GO(EC_KEY_new_by_curve_name, pFi)
|
||||
//GO(EC_KEY_set_conv_form,
|
||||
//GO(EC_KEY_set_enc_flags,
|
||||
//GO(EC_KEY_set_flags,
|
||||
//GO(EC_KEY_set_group,
|
||||
//GO(EC_KEY_set_private_key,
|
||||
//GO(EC_KEY_set_public_key,
|
||||
//GO(EC_KEY_set_public_key_affine_coordinates,
|
||||
GO(EC_KEY_set_group, iFpp)
|
||||
GO(EC_KEY_set_private_key, iFpp)
|
||||
GO(EC_KEY_set_public_key, iFpp)
|
||||
GO(EC_KEY_set_public_key_affine_coordinates, iFppp)
|
||||
//GO(EC_KEY_up_ref,
|
||||
//GO(EC_METHOD_get_field_type,
|
||||
GO(EC_METHOD_get_field_type, iFp)
|
||||
//GO(ECPARAMETERS_free,
|
||||
//GO(ECPARAMETERS_new,
|
||||
//GO(ECParameters_print,
|
||||
@@ -1439,33 +1451,37 @@ GO(EC_KEY_new_by_curve_name, pFi)
|
||||
//GO(ECPKParameters_print_fp,
|
||||
//GO(EC_POINT_add,
|
||||
//GO(EC_POINT_bn2point,
|
||||
//GO(EC_POINT_clear_free,
|
||||
GO(EC_POINT_clear_free, vFp)
|
||||
//GO(EC_POINT_cmp,
|
||||
//GO(EC_POINT_copy,
|
||||
GO(EC_POINT_copy, iFpp)
|
||||
//GO(EC_POINT_dbl,
|
||||
//GO(EC_POINT_dup,
|
||||
//GO(EC_POINT_free,
|
||||
//GO(EC_POINT_get_affine_coordinates_GF2m,
|
||||
//GO(EC_POINT_get_affine_coordinates_GFp,
|
||||
//GO(EC_POINT_get_Jprojective_coordinates_GFp,
|
||||
GO(EC_POINT_dup, pFpp)
|
||||
GO(EC_POINT_free, vFp)
|
||||
GO(EC_POINT_get_affine_coordinates, iFppppp)
|
||||
GO(EC_POINT_get_affine_coordinates_GF2m, iFppppp)
|
||||
GO(EC_POINT_get_affine_coordinates_GFp, iFppppp)
|
||||
GO(EC_POINT_get_Jprojective_coordinates_GFp, iFpppppp)
|
||||
//GO(EC_POINT_hex2point,
|
||||
//GO(EC_POINT_invert,
|
||||
//GO(EC_POINT_is_at_infinity,
|
||||
//GO(EC_POINT_is_on_curve,
|
||||
//GO(EC_POINT_make_affine,
|
||||
//GO(EC_POINT_method_of,
|
||||
//GO(EC_POINT_mul,
|
||||
//GO(EC_POINT_new,
|
||||
GO(EC_POINT_method_of, pFp)
|
||||
GO(EC_POINT_mul, iFpppppp)
|
||||
GO(EC_POINT_new, pFp)
|
||||
//GO(EC_POINT_oct2point,
|
||||
//GO(EC_POINT_point2buf,
|
||||
//GO(EC_POINT_point2bn,
|
||||
//GO(EC_POINT_point2hex,
|
||||
//GO(EC_POINT_point2oct,
|
||||
//GO(EC_POINT_set_affine_coordinates_GF2m,
|
||||
//GO(EC_POINT_set_affine_coordinates_GFp,
|
||||
//GO(EC_POINT_set_compressed_coordinates_GF2m,
|
||||
//GO(EC_POINT_set_compressed_coordinates_GFp,
|
||||
//GO(EC_POINT_set_Jprojective_coordinates_GFp,
|
||||
//GO(EC_POINT_set_to_infinity,
|
||||
//GO(EC_POINT_point2oct,
|
||||
GO(EC_POINT_set_affine_coordinates, iFppppp)
|
||||
GO(EC_POINT_set_affine_coordinates_GF2m, iFppppp)
|
||||
GO(EC_POINT_set_affine_coordinates_GFp, iFppppp)
|
||||
GO(EC_POINT_set_compressed_coordinates, iFpppip)
|
||||
GO(EC_POINT_set_compressed_coordinates_GF2m, iFpppip)
|
||||
GO(EC_POINT_set_compressed_coordinates_GFp, iFpppip)
|
||||
GO(EC_POINT_set_Jprojective_coordinates_GFp, iFpppppp)
|
||||
GO(EC_POINT_set_to_infinity, iFpp)
|
||||
//GO(EC_POINTs_make_affine,
|
||||
//GO(EC_POINTs_mul,
|
||||
//GO(ec_precompute_mont_data,
|
||||
@@ -2952,8 +2968,8 @@ GO(PKCS12_PBE_keyivgen, iFppipppi)
|
||||
//GO(pqueue_pop,
|
||||
//GO(pqueue_print,
|
||||
//GO(pqueue_size,
|
||||
//GO(private_AES_set_decrypt_key,
|
||||
//GO(private_AES_set_encrypt_key,
|
||||
GO(private_AES_set_decrypt_key, iFpip)
|
||||
GO(private_AES_set_encrypt_key, iFpip)
|
||||
//GO(private_Camellia_set_key,
|
||||
//GO(private_RC4_set_key,
|
||||
//GO(PROXY_CERT_INFO_EXTENSION_free,
|
||||
|
||||
Executable
+188
@@ -0,0 +1,188 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define _GNU_SOURCE /* See feature_test_macros(7) */
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "wrappedlibs.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "wrapper.h"
|
||||
#include "bridge.h"
|
||||
#include "librarian/library_private.h"
|
||||
#include "x86emu.h"
|
||||
#include "emu/x86emu_private.h"
|
||||
#include "callback.h"
|
||||
#include "librarian.h"
|
||||
#include "box86context.h"
|
||||
#include "emu/x86emu_private.h"
|
||||
#include "gtkclass.h"
|
||||
|
||||
const char* gdk3Name = "libgdk-3.so.0";
|
||||
#define LIBNAME gdk3
|
||||
|
||||
static char* libname = NULL;
|
||||
|
||||
typedef int (*iFpp_t) (void*, void*);
|
||||
typedef void (*vFpp_t) (void*, void*);
|
||||
typedef void (*vFppp_t) (void*, void*, void*);
|
||||
typedef int (*iFiippp_t) (int, int, void*, void*, void*);
|
||||
|
||||
#define SUPER() \
|
||||
GO(gdk_event_handler_set, vFppp_t) \
|
||||
GO(gdk_input_add_full, iFiippp_t) \
|
||||
GO(gdk_init, vFpp_t) \
|
||||
GO(gdk_init_check, iFpp_t) \
|
||||
GO(gdk_window_add_filter, vFppp_t) \
|
||||
GO(gdk_window_remove_filter, vFppp_t)
|
||||
|
||||
typedef struct gdk3_my_s {
|
||||
// functions
|
||||
#define GO(A, B) B A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
} gdk3_my_t;
|
||||
|
||||
void* getGdk3My(library_t* lib)
|
||||
{
|
||||
gdk3_my_t* my = (gdk3_my_t*)calloc(1, sizeof(gdk3_my_t));
|
||||
#define GO(A, W) my->A = (W)dlsym(lib->priv.w.lib, #A);
|
||||
SUPER()
|
||||
#undef GO
|
||||
return my;
|
||||
}
|
||||
#undef SUPER
|
||||
|
||||
void freeGdk3My(void* lib)
|
||||
{
|
||||
//gdk3_my_t *my = (gdk3_my_t *)lib;
|
||||
}
|
||||
|
||||
#define SUPER() \
|
||||
GO(0) \
|
||||
GO(1) \
|
||||
GO(2) \
|
||||
GO(3)
|
||||
|
||||
// GdkFilterFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_filter_fct_##A = 0; \
|
||||
static int my_filter_##A(void* xevent, void* event, void* data) \
|
||||
{ \
|
||||
return (int)RunFunction(my_context, my_filter_fct_##A, 3, xevent, event, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findFilterFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_filter_fct_##A == (uintptr_t)fct) return my_filter_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_filter_fct_##A == 0) {my_filter_fct_##A = (uintptr_t)fct; return my_filter_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GdkFilterFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void my3_event_handler(void* event, my_signal_t* sig)
|
||||
{
|
||||
RunFunction(my_context, sig->c_handler, 2, event, sig->data);
|
||||
}
|
||||
|
||||
EXPORT void my3_gdk_event_handler_set(x86emu_t* emu, void* func, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gdk3_my_t *my = (gdk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
if(!func)
|
||||
return my->gdk_event_handler_set(func, data, notify);
|
||||
|
||||
my_signal_t* sig = new_mysignal(func, data, notify);
|
||||
my->gdk_event_handler_set(my3_event_handler, sig, my_signal_delete);
|
||||
}
|
||||
|
||||
|
||||
static void my3_input_function(my_signal_t* sig, int source, int condition)
|
||||
{
|
||||
RunFunction(my_context, sig->c_handler, 3, sig->data, source, condition);
|
||||
}
|
||||
|
||||
EXPORT int my3_gdk_input_add(x86emu_t* emu, int source, int condition, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gdk3_my_t *my = (gdk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
if(!f)
|
||||
return my->gdk_input_add_full(source, condition, f, data, NULL);
|
||||
|
||||
my_signal_t* sig = new_mysignal(f, data, NULL);
|
||||
return my->gdk_input_add_full(source, condition, my3_input_function, sig, my_signal_delete);
|
||||
}
|
||||
|
||||
EXPORT int my3_gdk_input_add_full(x86emu_t* emu, int source, int condition, void* f, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gdk3_my_t *my = (gdk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
if(!f)
|
||||
return my->gdk_input_add_full(source, condition, f, data, notify);
|
||||
|
||||
my_signal_t* sig = new_mysignal(f, data, notify);
|
||||
return my->gdk_input_add_full(source, condition, my3_input_function, sig, my_signal_delete);
|
||||
}
|
||||
|
||||
EXPORT void my3_gdk_init(x86emu_t* emu, void* argc, void* argv)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gdk3_my_t *my = (gdk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gdk_init(argc, argv);
|
||||
my_checkGlobalGdkDisplay();
|
||||
}
|
||||
|
||||
EXPORT int my3_gdk_init_check(x86emu_t* emu, void* argc, void* argv)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gdk3_my_t *my = (gdk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
int ret = my->gdk_init_check(argc, argv);
|
||||
my_checkGlobalGdkDisplay();
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT void my3_gdk_window_add_filter(x86emu_t* emu, void* window, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gdk3_my_t *my = (gdk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gdk_window_add_filter(window, findFilterFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void my3_gdk_window_remove_filter(x86emu_t* emu, void* window, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gdk3_my_t *my = (gdk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gdk_window_remove_filter(window, findFilterFct(f), data);
|
||||
}
|
||||
|
||||
#define CUSTOM_INIT \
|
||||
libname = lib->name; \
|
||||
lib->altmy = strdup("my3_"); \
|
||||
lib->priv.w.p2 = getGdk3My(lib); \
|
||||
lib->priv.w.needed = 3; \
|
||||
lib->priv.w.neededlibs = (char**)calloc(lib->priv.w.needed, sizeof(char*)); \
|
||||
lib->priv.w.neededlibs[0] = strdup("libgobject-2.0.so.0"); \
|
||||
lib->priv.w.neededlibs[1] = strdup("libgio-2.0.so.0"); \
|
||||
lib->priv.w.neededlibs[2] = strdup("libgdk_pixbuf-2.0.so.0");
|
||||
|
||||
#define CUSTOM_FINI \
|
||||
freeGdk3My(lib->priv.w.p2); \
|
||||
free(lib->priv.w.p2);
|
||||
|
||||
|
||||
#include "wrappedlib_init.h"
|
||||
Executable
+795
@@ -0,0 +1,795 @@
|
||||
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
|
||||
#error meh!
|
||||
#endif
|
||||
|
||||
//GOM(gdk_add_client_message_filter, vFpBp)
|
||||
//GO(gdk_add_option_entries_libgtk_only,
|
||||
//GO(gdk_app_launch_context_get_type,
|
||||
//GO(gdk_app_launch_context_new,
|
||||
//GO(gdk_app_launch_context_set_desktop,
|
||||
//GO(gdk_app_launch_context_set_display,
|
||||
//GO(gdk_app_launch_context_set_icon,
|
||||
//GO(gdk_app_launch_context_set_icon_name,
|
||||
//GO(gdk_app_launch_context_set_screen,
|
||||
//GO(gdk_app_launch_context_set_timestamp,
|
||||
GO(gdk_atom_intern, pFpi)
|
||||
GO(gdk_atom_intern_static_string, pFp)
|
||||
GO(gdk_atom_name, pFp)
|
||||
GO(gdk_axis_use_get_type, iFv)
|
||||
GO(gdk_beep, vFv)
|
||||
GO(gdk_bitmap_create_from_data, pFppii)
|
||||
GO(gdk_byte_order_get_type, iFv)
|
||||
GO(gdk_cairo_create, pFp)
|
||||
GO(gdk_cairo_draw_from_gl, vFppiiiiiii)
|
||||
GO(gdk_cairo_get_clip_rectangle, iFpp)
|
||||
GO(gdk_cairo_get_drawing_context, pFp)
|
||||
GO(gdk_cairo_rectangle, vFpp)
|
||||
GO(gdk_cairo_region, vFpp)
|
||||
GO(gdk_cairo_region_create_from_surface, pFp)
|
||||
GO(gdk_cairo_reset_clip, vFpp)
|
||||
GO(gdk_cairo_set_source_color, vFpp)
|
||||
GO(gdk_cairo_set_source_pixbuf, vFppdd)
|
||||
GO(gdk_cairo_set_source_pixmap, vFppdd)
|
||||
GO(gdk_cairo_set_source_rgba, vFpp)
|
||||
GO(gdk_cairo_set_source_window, vFppdd)
|
||||
GO(gdk_cairo_surface_create_from_pixbuf, pFpip)
|
||||
//GO(gdk_cap_style_get_type,
|
||||
//GO(gdk_char_height,
|
||||
//GO(gdk_char_measure,
|
||||
//GO(gdk_char_width,
|
||||
//GO(gdk_char_width_wc,
|
||||
GO(gdk_color_alloc, iFpp)
|
||||
GO(gdk_color_black, iFpp)
|
||||
GO(gdk_color_change, iFpp)
|
||||
GO(gdk_color_copy, pFp)
|
||||
GO(gdk_color_equal, iFpp)
|
||||
GO(gdk_color_free, vFp)
|
||||
GO(gdk_color_get_type, iFv)
|
||||
GO(gdk_color_hash, uFp)
|
||||
GO(gdk_colormap_alloc_color, iFppii)
|
||||
GO(gdk_colormap_alloc_colors, iFppiiip)
|
||||
GO(gdk_colormap_change, vFpi)
|
||||
GO(gdk_colormap_free_colors, vFppi)
|
||||
GO(gdk_colormap_get_screen, pFp)
|
||||
GO(gdk_colormap_get_system, pFv)
|
||||
GO(gdk_colormap_get_system_size, iFv)
|
||||
GO(gdk_colormap_get_type, iFv)
|
||||
GO(gdk_colormap_get_visual, pFp)
|
||||
GO(gdk_colormap_new, pFpi)
|
||||
GO(gdk_colormap_query_color, vFpLp)
|
||||
GO(gdk_colormap_ref, pFp)
|
||||
GO(gdk_colormap_unref, vFp)
|
||||
GO(gdk_color_parse, iFpp)
|
||||
GO(gdk_colors_alloc, iFpipipi)
|
||||
GO(gdk_colors_free, vFppiL)
|
||||
GO(gdk_colors_store, vFppi)
|
||||
GO(gdk_color_to_string, pFp)
|
||||
GO(gdk_color_white, iFpp)
|
||||
GO(gdk_crossing_mode_get_type, iFv)
|
||||
GO(gdk_cursor_get_cursor_type, iFp)
|
||||
GO(gdk_cursor_get_display, pFp)
|
||||
GO(gdk_cursor_get_image, pFp)
|
||||
GO(gdk_cursor_get_type, iFv)
|
||||
GO(gdk_cursor_new, pFi)
|
||||
GO(gdk_cursor_new_for_display, pFpi)
|
||||
GO(gdk_cursor_new_from_name, pFpp)
|
||||
GO(gdk_cursor_new_from_pixbuf, pFppii)
|
||||
GO(gdk_cursor_new_from_pixmap, pFppppii)
|
||||
GO(gdk_cursor_ref, pFp)
|
||||
GO(gdk_cursor_type_get_type, iFv)
|
||||
GO(gdk_cursor_unref, vFp)
|
||||
GO(gdk_device_free_history, vFpi)
|
||||
GO(gdk_device_get_axis, iFppip)
|
||||
GO(gdk_device_get_axis_use, iFpu)
|
||||
GO(gdk_device_get_core_pointer, pFv)
|
||||
GO(gdk_device_get_has_cursor, iFp)
|
||||
GO(gdk_device_get_history, iFppuupp)
|
||||
GO(gdk_device_get_key, vFpupp)
|
||||
GO(gdk_device_get_mode, iFp)
|
||||
GO(gdk_device_get_name, pFp)
|
||||
GO(gdk_device_get_n_axes, iFp)
|
||||
GO(gdk_device_get_n_keys, iFp)
|
||||
GO(gdk_device_get_source, iFp)
|
||||
GO(gdk_device_get_state, vFpppp)
|
||||
GO(gdk_device_get_type, iFv)
|
||||
GO(gdk_device_set_axis_use, vFpui)
|
||||
GO(gdk_device_set_key, vFpuui)
|
||||
GO(gdk_device_set_mode, iFpi)
|
||||
GO(gdk_device_set_source, vFpi)
|
||||
GO(gdk_devices_list, pFv)
|
||||
//GOM(gdk_display_add_client_message_filter, vFEpppp)
|
||||
GO(gdk_display_beep, vFp)
|
||||
GO(gdk_display_close, vFp)
|
||||
GO(gdk_display_flush, vFp)
|
||||
GO(gdk_display_get_core_pointer, pFp)
|
||||
GO(gdk_display_get_default, pFv)
|
||||
GO(gdk_display_get_default_cursor_size, uFp)
|
||||
GO(gdk_display_get_default_group, pFp)
|
||||
GO(gdk_display_get_default_screen, pFp)
|
||||
GO(gdk_display_get_event, pFp)
|
||||
GO(gdk_display_get_maximal_cursor_size, vFppp)
|
||||
GO(gdk_display_get_name, pFp)
|
||||
GO(gdk_display_get_n_screens, iFp)
|
||||
GO(gdk_display_get_pointer, vFppppp)
|
||||
GO(gdk_display_get_screen, pFpi)
|
||||
GO(gdk_display_get_type, iFv)
|
||||
GO(gdk_display_get_window_at_pointer, pFppp)
|
||||
GO(gdk_display_is_closed, iFp)
|
||||
GO(gdk_display_keyboard_ungrab, vFpu)
|
||||
GO(gdk_display_list_devices, pFp)
|
||||
GO(gdk_display_manager_get, pFv)
|
||||
GO(gdk_display_manager_get_default_display, pFp)
|
||||
GO(gdk_display_manager_get_type, iFv)
|
||||
GO(gdk_display_manager_list_displays, pFp)
|
||||
GO(gdk_display_manager_set_default_display, vFpp)
|
||||
GO(gdk_display_open, pFp)
|
||||
//GO(gdk_display_open_default_libgtk_only,
|
||||
GO(gdk_display_peek_event, pFp)
|
||||
GO(gdk_display_pointer_is_grabbed, iFp)
|
||||
GO(gdk_display_pointer_ungrab, vFpu)
|
||||
GO(gdk_display_put_event, vFpp)
|
||||
GO(gdk_display_request_selection_notification, iFpp)
|
||||
GO(gdk_display_set_double_click_distance, vFpu)
|
||||
GO(gdk_display_set_double_click_time, vFpu)
|
||||
//GOM(gdk_display_set_pointer_hooks, pFEpp) // GdkDisplayPointerHooks needs wrapping
|
||||
GO(gdk_display_store_clipboard, vFppupi)
|
||||
GO(gdk_display_supports_clipboard_persistence, iFp)
|
||||
GO(gdk_display_supports_composite, iFp)
|
||||
GO(gdk_display_supports_cursor_alpha, iFp)
|
||||
GO(gdk_display_supports_cursor_color, iFp)
|
||||
GO(gdk_display_supports_input_shapes, iFp)
|
||||
GO(gdk_display_supports_selection_notification, iFp)
|
||||
GO(gdk_display_supports_shapes, iFp)
|
||||
GO(gdk_display_sync, vFp)
|
||||
GO(gdk_display_warp_pointer, vFppii)
|
||||
GO(gdk_drag_abort, vFpu)
|
||||
GO(gdk_drag_action_get_type, iFv)
|
||||
GO(gdk_drag_begin, pFpp)
|
||||
GO(gdk_drag_context_get_actions, iFp)
|
||||
GO(gdk_drag_context_get_dest_window, pFp)
|
||||
GO(gdk_drag_context_get_protocol, iFp)
|
||||
GO(gdk_drag_context_get_selected_action, iFp)
|
||||
GO(gdk_drag_context_get_source_window, pFp)
|
||||
GO(gdk_drag_context_get_suggested_action, iFp)
|
||||
GO(gdk_drag_context_get_type, iFv)
|
||||
GO(gdk_drag_context_list_targets, pFp)
|
||||
GO(gdk_drag_context_new, pFv)
|
||||
GO(gdk_drag_context_ref, vFp)
|
||||
GO(gdk_drag_context_unref, vFp)
|
||||
GO(gdk_drag_drop, vFpu)
|
||||
GO(gdk_drag_drop_succeeded, iFp)
|
||||
GO(gdk_drag_find_window, vFppiipp)
|
||||
GO(gdk_drag_find_window_for_screen, vFpppiipp)
|
||||
GO(gdk_drag_get_protocol, pFpp)
|
||||
GO(gdk_drag_get_protocol_for_display, pFppp)
|
||||
GO(gdk_drag_get_selection, pFp)
|
||||
GO(gdk_drag_motion, iFppiiiiiu)
|
||||
GO(gdk_drag_protocol_get_type, iFv)
|
||||
GO(gdk_drag_status, vFpiu)
|
||||
GO(gdk_drawable_copy_to_image, pFppiiiiii)
|
||||
GO(gdk_drawable_get_clip_region, pFp)
|
||||
GO(gdk_drawable_get_colormap, pFp)
|
||||
GO(gdk_drawable_get_data, pFpp)
|
||||
GO(gdk_drawable_get_depth, iFp)
|
||||
GO(gdk_drawable_get_display, pFp)
|
||||
GO(gdk_drawable_get_image, pFpiiii)
|
||||
GO(gdk_drawable_get_screen, pFp)
|
||||
GO(gdk_drawable_get_size, vFppp)
|
||||
GO(gdk_drawable_get_type, iFv)
|
||||
GO(gdk_drawable_get_visible_region, pFp)
|
||||
GO(gdk_drawable_get_visual, pFp)
|
||||
GO(gdk_drawable_ref, pFp)
|
||||
GO(gdk_drawable_set_colormap, vFpp)
|
||||
//GOM(gdk_drawable_set_data, vFEpppB)
|
||||
GO(gdk_drawable_unref, vFp)
|
||||
GO(gdk_draw_arc, vFppiiiiiii)
|
||||
GO(gdk_draw_drawable, vFpppiiiiii)
|
||||
GO(gdk_draw_glyphs, vFpppiip)
|
||||
GO(gdk_draw_glyphs_transformed, vFppppiip)
|
||||
GO(gdk_draw_gray_image, vFppiiiiipi)
|
||||
GO(gdk_draw_image, vFpppiiiiii)
|
||||
GO(gdk_draw_indexed_image, vFppiiiiipip)
|
||||
GO(gdk_draw_layout, vFppiip)
|
||||
GO(gdk_draw_layout_line, vFppiip)
|
||||
GO(gdk_draw_layout_line_with_colors, vFppiippp)
|
||||
GO(gdk_draw_layout_with_colors, vFppiippp)
|
||||
GO(gdk_draw_line, vFppiiii)
|
||||
GO(gdk_draw_lines, vFpppi)
|
||||
GO(gdk_draw_pixbuf, vFpppiiiiiiiii)
|
||||
GO(gdk_draw_point, vFppii)
|
||||
GO(gdk_draw_points, vFpppi)
|
||||
GO(gdk_draw_polygon, vFppipi)
|
||||
GO(gdk_draw_rectangle, vFppiiiii)
|
||||
GO(gdk_draw_rgb_32_image, vFppiiiiipi)
|
||||
GO(gdk_draw_rgb_32_image_dithalign, vFppiiiiipiii)
|
||||
GO(gdk_draw_rgb_image, vFppiiiiipi)
|
||||
GO(gdk_draw_rgb_image_dithalign, vFppiiiiipiii)
|
||||
GO(gdk_draw_segments, vFpppi)
|
||||
GO(gdk_draw_string, vFpppiip)
|
||||
GO(gdk_draw_text, vFpppiipi)
|
||||
GO(gdk_draw_text_wc, vFpppiipi)
|
||||
GO(gdk_draw_trapezoids, vFpppi)
|
||||
GO(gdk_drop_finish, vFpiu)
|
||||
GO(gdk_drop_reply, vFpiu)
|
||||
GO(gdk_error_trap_pop, iFv)
|
||||
GO(gdk_error_trap_push, vFv)
|
||||
GO(gdk_event_copy, pFp)
|
||||
GO(gdk_event_free, vFp)
|
||||
GO(gdk_event_get, pFv)
|
||||
GO(gdk_event_get_axis, iFpip)
|
||||
GO(gdk_event_get_coords, iFppp)
|
||||
GO(gdk_event_get_graphics_expose, pFp)
|
||||
GO(gdk_event_get_root_coords, iFppp)
|
||||
GO(gdk_event_get_screen, pFp)
|
||||
GO(gdk_event_get_state, iFpp)
|
||||
GO(gdk_event_get_time, uFp)
|
||||
GO(gdk_event_get_type, iFv)
|
||||
GOM(gdk_event_handler_set, vFEppp)
|
||||
GO(gdk_event_mask_get_type, iFv)
|
||||
GO(gdk_event_new, pFi)
|
||||
GO(gdk_event_peek, pFv)
|
||||
GO(gdk_event_put, vFp)
|
||||
GO(gdk_event_request_motions, vFp)
|
||||
GO(gdk_event_send_client_message, iFpp)
|
||||
GO(gdk_event_send_client_message_for_display, iFppp)
|
||||
GO(gdk_event_send_clientmessage_toall, vFp)
|
||||
GO(gdk_event_set_screen, vFpp)
|
||||
GO(gdk_events_pending, iFv)
|
||||
//GO(gdk_event_type_get_type,
|
||||
GO(gdk_exit, vFi)
|
||||
//GO(gdk_extension_mode_get_type,
|
||||
//GO(gdk_fill_get_type,
|
||||
//GO(gdk_fill_rule_get_type,
|
||||
//GO(gdk_filter_return_get_type,
|
||||
GO(gdk_flush, vFv)
|
||||
//GO(gdk_font_equal,
|
||||
//GO(gdk_font_from_description,
|
||||
//GO(gdk_font_from_description_for_display,
|
||||
//GO(gdk_font_get_display,
|
||||
GO(gdk_font_get_type, iFv)
|
||||
//GO(gdk_font_id,
|
||||
//GO(gdk_font_load,
|
||||
//GO(gdk_font_load_for_display,
|
||||
//GO(gdk_font_ref,
|
||||
//GO(gdk_fontset_load,
|
||||
//GO(gdk_fontset_load_for_display,
|
||||
//GO(gdk_font_type_get_type,
|
||||
//GO(gdk_font_unref,
|
||||
GO(gdk_free_compound_text, vFp)
|
||||
GO(gdk_free_text_list, vFp)
|
||||
GO(gdk_function_get_type, iFv)
|
||||
GO(gdk_gc_copy, vFpp)
|
||||
GO(gdk_gc_get_colormap, pFp)
|
||||
GO(gdk_gc_get_screen, pFp)
|
||||
GO(gdk_gc_get_type, iFv)
|
||||
GO(gdk_gc_get_values, vFpp)
|
||||
GO(gdk_gc_new, pFp)
|
||||
GO(gdk_gc_new_with_values, pFppu)
|
||||
GO(gdk_gc_offset, vFpii)
|
||||
GO(gdk_gc_ref, pFp)
|
||||
GO(gdk_gc_set_background, vFpp)
|
||||
GO(gdk_gc_set_clip_mask, vFpp)
|
||||
GO(gdk_gc_set_clip_origin, vFpii)
|
||||
GO(gdk_gc_set_clip_rectangle, vFpp)
|
||||
GO(gdk_gc_set_clip_region, vFpp)
|
||||
GO(gdk_gc_set_colormap, vFpp)
|
||||
GO(gdk_gc_set_dashes, vFpipi)
|
||||
GO(gdk_gc_set_exposures, vFpi)
|
||||
GO(gdk_gc_set_fill, vFpi)
|
||||
GO(gdk_gc_set_font, vFpp)
|
||||
GO(gdk_gc_set_foreground, vFpp)
|
||||
GO(gdk_gc_set_function,vFpi)
|
||||
GO(gdk_gc_set_line_attributes, vFpiiii)
|
||||
GO(gdk_gc_set_rgb_bg_color, vFpp)
|
||||
GO(gdk_gc_set_rgb_fg_color, vFpp)
|
||||
GO(gdk_gc_set_stipple, vFpp)
|
||||
GO(gdk_gc_set_subwindow, vFpi)
|
||||
GO(gdk_gc_set_tile, vFpp)
|
||||
GO(gdk_gc_set_ts_origin, vFpii)
|
||||
GO(gdk_gc_set_values, vFppu)
|
||||
GO(gdk_gc_unref, vFp)
|
||||
GO(gdk_gc_values_mask_get_type, iFv)
|
||||
GO(gdk_get_default_root_window, pFv)
|
||||
GO(gdk_get_display, pFv)
|
||||
GO(gdk_get_display_arg_name, pFv)
|
||||
GO(gdk_get_program_class, pFv)
|
||||
GO(gdk_get_show_events, iFv)
|
||||
GO(gdk_get_use_xshm, iFv)
|
||||
GO(gdk_grab_status_get_type, iFv)
|
||||
GO(gdk_gravity_get_type, iFv)
|
||||
GO(gdk_image_get, pFpiiii)
|
||||
GO(gdk_image_get_bits_per_pixel, WFp)
|
||||
GO(gdk_image_get_byte_order, iFp)
|
||||
GO(gdk_image_get_bytes_per_line, WFp)
|
||||
GO(gdk_image_get_bytes_per_pixel, WFp)
|
||||
GO(gdk_image_get_colormap, pFp)
|
||||
GO(gdk_image_get_depth, WFp)
|
||||
GO(gdk_image_get_height, iFp)
|
||||
GO(gdk_image_get_image_type, iFp)
|
||||
GO(gdk_image_get_pixel, uFpii)
|
||||
GO(gdk_image_get_pixels, pFp)
|
||||
GO(gdk_image_get_type, iFv)
|
||||
GO(gdk_image_get_visual, pFp)
|
||||
GO(gdk_image_get_width, iFp)
|
||||
GO(gdk_image_new, pFipii)
|
||||
GO(gdk_image_new_bitmap, pFppii)
|
||||
GO(gdk_image_put_pixel, vFpiiu)
|
||||
GO(gdk_image_ref, pFp)
|
||||
GO(gdk_image_set_colormap, vFpp)
|
||||
GO(gdk_image_type_get_type, iFv)
|
||||
GO(gdk_image_unref, vFp)
|
||||
GOM(gdk_init, vFEpp)
|
||||
GOM(gdk_init_check, iFEpp)
|
||||
GOM(gdk_input_add, iFEiipp)
|
||||
GOM(gdk_input_add_full, iFEiippp)
|
||||
GO(gdk_input_condition_get_type, iFv)
|
||||
GO(gdk_input_mode_get_type, iFv)
|
||||
GO(gdk_input_remove, vFi)
|
||||
GO(gdk_input_set_extension_events, vFpii)
|
||||
GO(gdk_input_source_get_type, iFv)
|
||||
GO(gdk_join_style_get_type, iFv)
|
||||
GO(gdk_keyboard_grab, iFpiu)
|
||||
//GO(gdk_keyboard_grab_info_libgtk_only,
|
||||
GO(gdk_keyboard_ungrab, vFu)
|
||||
GO(gdk_keymap_add_virtual_modifiers, vFpp)
|
||||
GO(gdk_keymap_get_caps_lock_state, iFp)
|
||||
GO(gdk_keymap_get_default, pFv)
|
||||
GO(gdk_keymap_get_direction, iFp)
|
||||
GO(gdk_keymap_get_entries_for_keycode, iFpuppp)
|
||||
GO(gdk_keymap_get_entries_for_keyval, iFpupp)
|
||||
GO(gdk_keymap_get_for_display, pFp)
|
||||
GO(gdk_keymap_get_type, iFv)
|
||||
GO(gdk_keymap_have_bidi_layouts, iFp)
|
||||
GO(gdk_keymap_lookup_key, uFpp)
|
||||
GO(gdk_keymap_map_virtual_modifiers, iFpp)
|
||||
GO(gdk_keymap_translate_keyboard_state, iFpuiipppp)
|
||||
GO(gdk_keyval_convert_case, vFupp)
|
||||
GO(gdk_keyval_from_name, uFp)
|
||||
GO(gdk_keyval_is_lower, iFu)
|
||||
GO(gdk_keyval_is_upper, iFu)
|
||||
GO(gdk_keyval_name, pFu)
|
||||
GO(gdk_keyval_to_lower, uFu)
|
||||
GO(gdk_keyval_to_unicode, uFu)
|
||||
GO(gdk_keyval_to_upper, uFu)
|
||||
GO(gdk_line_style_get_type, iFv)
|
||||
GO(gdk_list_visuals, pFv)
|
||||
//GO(gdk_mbstowcs,
|
||||
GO(gdk_modifier_type_get_type, iFv)
|
||||
GO(gdk_net_wm_supports, iFp)
|
||||
GO(gdk_notify_startup_complete, vFv)
|
||||
GO(gdk_notify_startup_complete_with_id, vFp)
|
||||
GO(gdk_notify_type_get_type, iFv)
|
||||
GO(gdk_offscreen_window_get_embedder, pFp)
|
||||
GO(gdk_offscreen_window_get_pixmap, pFp)
|
||||
GO(gdk_offscreen_window_get_type, iFv)
|
||||
GO(gdk_offscreen_window_set_embedder, vFpp)
|
||||
GO(gdk_overlap_type_get_type, iFv)
|
||||
GO(gdk_owner_change_get_type, iFv)
|
||||
GO(gdk_pango_attr_emboss_color_new, pFp)
|
||||
GO(gdk_pango_attr_embossed_new, pFi)
|
||||
GO(gdk_pango_attr_stipple_new, pFp)
|
||||
GO(gdk_pango_context_get, pFv)
|
||||
GO(gdk_pango_context_get_for_screen, pFp)
|
||||
GO(gdk_pango_context_set_colormap, vFpp)
|
||||
GO(gdk_pango_layout_get_clip_region, pFpiipi)
|
||||
GO(gdk_pango_layout_line_get_clip_region, pFpiipi)
|
||||
GO(gdk_pango_renderer_get_default, pFp)
|
||||
GO(gdk_pango_renderer_get_type, iFv)
|
||||
GO(gdk_pango_renderer_new, pFp)
|
||||
GO(gdk_pango_renderer_set_drawable, vFpp)
|
||||
GO(gdk_pango_renderer_set_gc, vFpp)
|
||||
GO(gdk_pango_renderer_set_override_color, vFpip)
|
||||
GO(gdk_pango_renderer_set_stipple, vFpip)
|
||||
GO(gdk_parse_args, vFpp)
|
||||
GO(gdk_pixbuf_get_from_drawable, pFpppiiiiii)
|
||||
GO(gdk_pixbuf_get_from_image, pFpppiiiiii)
|
||||
GO(gdk_pixbuf_render_pixmap_and_mask, vFpppi)
|
||||
GO(gdk_pixbuf_render_pixmap_and_mask_for_colormap, vFppppi)
|
||||
GO(gdk_pixbuf_render_threshold_alpha, vFppiiiiiii)
|
||||
GO(gdk_pixbuf_render_to_drawable, vFpppiiiiiiiii)
|
||||
GO(gdk_pixbuf_render_to_drawable_alpha, vFppiiiiiiiiiii)
|
||||
GO(gdk_pixmap_colormap_create_from_xpm, pFppppp)
|
||||
GO(gdk_pixmap_colormap_create_from_xpm_d, pFppppp)
|
||||
GO(gdk_pixmap_create_from_data, pFppiiipp)
|
||||
GO(gdk_pixmap_create_from_xpm, pFpppp)
|
||||
GO(gdk_pixmap_create_from_xpm_d, pFpppp)
|
||||
GO(gdk_pixmap_foreign_new, pFp)
|
||||
GO(gdk_pixmap_foreign_new_for_display, pFpp)
|
||||
GO(gdk_pixmap_foreign_new_for_screen, pFppiii)
|
||||
GO(gdk_pixmap_get_size, vFppp)
|
||||
GO(gdk_pixmap_get_type, iFv)
|
||||
GO(gdk_pixmap_impl_x11_get_type, iFv)
|
||||
GO(gdk_pixmap_lookup, pFp)
|
||||
GO(gdk_pixmap_lookup_for_display, pFpp)
|
||||
GO(gdk_pixmap_new, pFpiii)
|
||||
GO(gdk_pointer_grab, iFpiippu)
|
||||
//GO(gdk_pointer_grab_info_libgtk_only,
|
||||
GO(gdk_pointer_is_grabbed, iFv)
|
||||
GO(gdk_pointer_ungrab, vFu)
|
||||
//GO(gdk_pre_parse_libgtk_only,
|
||||
GO(gdk_property_change, vFpppiipi)
|
||||
GO(gdk_property_delete, vFpp)
|
||||
GO(gdk_property_get, iFpppLLipppp)
|
||||
GO(gdk_property_state_get_type, iFv)
|
||||
GO(gdk_prop_mode_get_type, iFv)
|
||||
GO(gdk_query_depths, vFpp)
|
||||
GO(gdk_query_visual_types, vFpp)
|
||||
GO(gdk_rectangle_get_type, iFv)
|
||||
GO(gdk_rectangle_intersect, iFppp)
|
||||
GO(gdk_rectangle_union, vFppp)
|
||||
GO(gdk_region_copy, pFp)
|
||||
GO(gdk_region_destroy, vFpp)
|
||||
GO(gdk_region_empty, iFp)
|
||||
GO(gdk_region_equal, iFpp)
|
||||
GO(gdk_region_get_clipbox, vFpp)
|
||||
GO(gdk_region_get_rectangles, vFppp)
|
||||
GO(gdk_region_intersect, vFpp)
|
||||
GO(gdk_region_new, pFv)
|
||||
GO(gdk_region_offset, vFpii)
|
||||
GO(gdk_region_point_in, iFpii)
|
||||
GO(gdk_region_polygon, pFpii)
|
||||
GO(gdk_region_rectangle, pFp)
|
||||
GO(gdk_region_rect_equal, iFpp)
|
||||
GO(gdk_region_rect_in, iFpp)
|
||||
GO(gdk_region_shrink, vFpii)
|
||||
//GOM(gdk_region_spans_intersect_foreach, vFppiiBp)
|
||||
GO(gdk_region_subtract, vFpp)
|
||||
GO(gdk_region_union, vFpp)
|
||||
GO(gdk_region_union_with_rect, vFpp)
|
||||
GO(gdk_region_xor, vFpp)
|
||||
GO(gdk_rgb_cmap_free, vFp)
|
||||
GO(gdk_rgb_cmap_new, pFpi)
|
||||
GO(gdk_rgb_colormap_ditherable, iFp)
|
||||
GO(gdk_rgb_ditherable, iFv)
|
||||
GO(gdk_rgb_dither_get_type, iFv)
|
||||
GO(gdk_rgb_find_color, vFpp)
|
||||
GO(gdk_rgb_gc_set_background, vFpu)
|
||||
GO(gdk_rgb_gc_set_foreground, vFpu)
|
||||
GO(gdk_rgb_get_colormap, pFv)
|
||||
GO(gdk_rgb_get_visual, pFv)
|
||||
GO(gdk_rgb_init, vFv)
|
||||
GO(gdk_rgb_set_install, vFi)
|
||||
GO(gdk_rgb_set_min_colors, vFi)
|
||||
GO(gdk_rgb_set_verbose, vFi)
|
||||
GO(gdk_rgb_xpixel_from_rgb, LFu)
|
||||
GO(gdk_screen_broadcast_client_message, vFpp)
|
||||
GO(gdk_screen_get_active_window, pFp)
|
||||
GO(gdk_screen_get_default, pFv)
|
||||
GO(gdk_screen_get_default_colormap, pFp)
|
||||
GO(gdk_screen_get_display, pFp)
|
||||
GO(gdk_screen_get_font_options, pFp)
|
||||
GO(gdk_screen_get_height, iFp)
|
||||
GO(gdk_screen_get_height_mm, iFp)
|
||||
GO(gdk_screen_get_monitor_at_point, iFpii)
|
||||
GO(gdk_screen_get_monitor_at_window, iFpp)
|
||||
GO(gdk_screen_get_monitor_geometry, vFpip)
|
||||
GO(gdk_screen_get_monitor_height_mm, iFpi)
|
||||
GO(gdk_screen_get_monitor_plug_name, pFpi)
|
||||
GO(gdk_screen_get_monitor_width_mm, iFpi)
|
||||
GO(gdk_screen_get_n_monitors, iFp)
|
||||
GO(gdk_screen_get_number, iFp)
|
||||
GO(gdk_screen_get_primary_monitor, iFp)
|
||||
GO(gdk_screen_get_resolution, dFp)
|
||||
GO(gdk_screen_get_rgba_colormap, pFp)
|
||||
GO(gdk_screen_get_rgba_visual, pFp)
|
||||
GO(gdk_screen_get_rgb_colormap, pFp)
|
||||
GO(gdk_screen_get_rgb_visual, pFp)
|
||||
GO(gdk_screen_get_root_window, pFp)
|
||||
GO(gdk_screen_get_setting, iFppp)
|
||||
GO(gdk_screen_get_system_colormap, pFp)
|
||||
GO(gdk_screen_get_system_visual, pFp)
|
||||
GO(gdk_screen_get_toplevel_windows, pFp)
|
||||
GO(gdk_screen_get_type, iFv)
|
||||
GO(gdk_screen_get_width, iFp)
|
||||
GO(gdk_screen_get_width_mm, iFp)
|
||||
GO(gdk_screen_get_window_stack, pFp)
|
||||
GO(gdk_screen_height, iFv)
|
||||
GO(gdk_screen_height_mm, iFv)
|
||||
GO(gdk_screen_is_composited, iFp)
|
||||
GO(gdk_screen_list_visuals, pFp)
|
||||
GO(gdk_screen_make_display_name, pFp)
|
||||
GO(gdk_screen_set_default_colormap, vFpp)
|
||||
GO(gdk_screen_set_font_options, vFpp)
|
||||
GO(gdk_screen_set_resolution, vFpd)
|
||||
GO(gdk_screen_width, iFv)
|
||||
GO(gdk_screen_width_mm, iFv)
|
||||
GO(gdk_scroll_direction_get_type, iFv)
|
||||
GO(gdk_selection_convert, vFpppu)
|
||||
GO(gdk_selection_owner_get, pFp)
|
||||
GO(gdk_selection_owner_get_for_display, pFpp)
|
||||
GO(gdk_selection_owner_set, iFppui)
|
||||
GO(gdk_selection_owner_set_for_display, iFpppui)
|
||||
GO(gdk_selection_property_get, iFpppp)
|
||||
GO(gdk_selection_send_notify, vFppppu)
|
||||
GO(gdk_selection_send_notify_for_display, vFpppppu)
|
||||
GO(gdk_set_double_click_time, vFu)
|
||||
GO(gdk_set_locale, pFv)
|
||||
//GOM(gdk_set_pointer_hooks, BFEB)
|
||||
GO(gdk_set_program_class, vFp)
|
||||
GO(gdk_set_show_events, vFi)
|
||||
GO(gdk_set_sm_client_id, vFp)
|
||||
GO(gdk_setting_action_get_type, iFv)
|
||||
GO(gdk_setting_get, iFpp)
|
||||
GO(gdk_set_use_xshm, vFi)
|
||||
GO(gdk_spawn_command_line_on_screen, iFppp)
|
||||
//GOM(gdk_spawn_on_screen, iFEppppipppp)
|
||||
//GOM(gdk_spawn_on_screen_with_pipes, iFEppppippppppp)
|
||||
GO(gdk_status_get_type, iFv)
|
||||
//GO(gdk_string_extents,
|
||||
//GO(gdk_string_height,
|
||||
//GO(gdk_string_measure,
|
||||
GO(gdk_string_to_compound_text, iFppppp)
|
||||
GO(gdk_string_to_compound_text_for_display, iFpppppp)
|
||||
//GO(gdk_string_width,
|
||||
//GO(gdk_subwindow_mode_get_type,
|
||||
//GO(gdk_synthesize_window_state,
|
||||
//GO(gdk_test_render_sync,
|
||||
//GO(gdk_test_simulate_button,
|
||||
//GO(gdk_test_simulate_key,
|
||||
//GO(gdk_text_extents,
|
||||
//GO(gdk_text_extents_wc,
|
||||
//GO(gdk_text_height,
|
||||
//GO(gdk_text_measure,
|
||||
GO(gdk_text_property_to_text_list, iFpipip)
|
||||
GO(gdk_text_property_to_text_list_for_display, iFppipip)
|
||||
GO(gdk_text_property_to_utf8_list, iFpipip)
|
||||
//GO(gdk_text_property_to_utf8_list_for_display,
|
||||
//GO(gdk_text_width,
|
||||
//GO(gdk_text_width_wc,
|
||||
//GOM(gdk_threads_add_idle, uFEpp)
|
||||
//GOM(gdk_threads_add_idle_full, uFEippp)
|
||||
//GOM(gdk_threads_add_timeout, uFEupp)
|
||||
//GOM(gdk_threads_add_timeout_full, uFEiuppp)
|
||||
//GOM(gdk_threads_add_timeout_seconds, uFEupp)
|
||||
//GOM(gdk_threads_add_timeout_seconds_full, uFEiuppp)
|
||||
GO(gdk_threads_enter, vFv)
|
||||
GO(gdk_threads_init, vFv)
|
||||
GO(gdk_threads_leave, vFv)
|
||||
//GOM(gdk_threads_set_lock_functions, vFEpp)
|
||||
GO(gdk_unicode_to_keyval, uFu)
|
||||
GO(gdk_utf8_to_compound_text, iFppppp)
|
||||
GO(gdk_utf8_to_compound_text_for_display, iFpppppp)
|
||||
GO(gdk_utf8_to_string_target, pFp)
|
||||
GO(gdk_visibility_state_get_type, iFv)
|
||||
GO(gdk_visual_get_best, pFv)
|
||||
GO(gdk_visual_get_best_depth, iFv)
|
||||
GO(gdk_visual_get_best_type, iFv)
|
||||
GO(gdk_visual_get_best_with_both, pFii)
|
||||
GO(gdk_visual_get_best_with_depth, pFi)
|
||||
GO(gdk_visual_get_best_with_type, pFi)
|
||||
GO(gdk_visual_get_bits_per_rgb, iFp)
|
||||
GO(gdk_visual_get_blue_pixel_details, vFpppp)
|
||||
GO(gdk_visual_get_byte_order, iFp)
|
||||
GO(gdk_visual_get_colormap_size, iFp)
|
||||
GO(gdk_visual_get_depth, iFp)
|
||||
GO(gdk_visual_get_green_pixel_details, vFpppp)
|
||||
GO(gdk_visual_get_red_pixel_details, vFpppp)
|
||||
GO(gdk_visual_get_screen, pFp)
|
||||
GO(gdk_visual_get_system, pFv)
|
||||
GO(gdk_visual_get_type, iFv)
|
||||
GO(gdk_visual_get_visual_type, iFp)
|
||||
GO(gdk_visual_type_get_type, iFv)
|
||||
//GO(gdk_wcstombs,
|
||||
GOM(gdk_window_add_filter, vFEppp)
|
||||
GO(gdk_window_at_pointer, pFpp)
|
||||
//GO(gdk_window_attributes_type_get_type,
|
||||
GO(gdk_window_beep, vFp)
|
||||
GO(gdk_window_begin_move_drag, vFpiiiu)
|
||||
GO(gdk_window_begin_paint_rect, vFpp)
|
||||
GO(gdk_window_begin_paint_region, vFpp)
|
||||
GO(gdk_window_begin_resize_drag, vFpuiiiu)
|
||||
GO(gdk_window_class_get_type, iFv)
|
||||
GO(gdk_window_clear, vFp)
|
||||
GO(gdk_window_clear_area, vFpiiii)
|
||||
GO(gdk_window_clear_area_e, vFpiiii)
|
||||
GO(gdk_window_configure_finished, vFp)
|
||||
GO(gdk_window_constrain_size, vFpuiipp)
|
||||
GO(gdk_window_coords_from_parent, vFpddpp)
|
||||
GO(gdk_window_coords_to_parent, vFpddpp)
|
||||
GO(gdk_window_create_similar_image_surface, pFpiiii)
|
||||
GO(gdk_window_create_similar_surface, pFpiii)
|
||||
GO(gdk_window_deiconify, vFp)
|
||||
GO(gdk_window_destroy, vFp)
|
||||
//GO(gdk_window_destroy_notify,
|
||||
//GO(gdk_window_edge_get_type,
|
||||
GO(gdk_window_enable_synchronized_configure, vFp)
|
||||
GO(gdk_window_end_paint, vFp)
|
||||
GO(gdk_window_ensure_native, iFp)
|
||||
GO(gdk_window_flush, vFp)
|
||||
GO(gdk_window_focus, vFpu)
|
||||
GO(gdk_window_foreign_new, pFp)
|
||||
GO(gdk_window_foreign_new_for_display, pFpp)
|
||||
//GO(gdk_window_freeze_toplevel_updates_libgtk_only,
|
||||
GO(gdk_window_freeze_updates, vFp)
|
||||
GO(gdk_window_fullscreen, vFp)
|
||||
GO(gdk_window_geometry_changed, vFp)
|
||||
GO(gdk_window_get_accept_focus, iFp)
|
||||
GO(gdk_window_get_background_pattern, pFp)
|
||||
GO(gdk_window_get_children, pFp)
|
||||
GO(gdk_window_get_composited, iFp)
|
||||
GO(gdk_window_get_cursor, pFp)
|
||||
GO(gdk_window_get_decorations, iFpp)
|
||||
GO(gdk_window_get_deskrelative_origin, iFppp)
|
||||
GO(gdk_window_get_display, pFp)
|
||||
GO(gdk_window_get_effective_parent, pFp)
|
||||
GO(gdk_window_get_effective_toplevel, pFp)
|
||||
GO(gdk_window_get_events, vFpi)
|
||||
GO(gdk_window_get_focus_on_map, iFp)
|
||||
GO(gdk_window_get_frame_extents, vFpp)
|
||||
GO(gdk_window_get_geometry, vFpppppp)
|
||||
GO(gdk_window_get_group, pFp)
|
||||
GO(gdk_window_get_height, iFp)
|
||||
GO(gdk_window_get_internal_paint_info, vFpppp)
|
||||
GO(gdk_window_get_modal_hint, iFp)
|
||||
GO(gdk_window_get_origin, iFppp)
|
||||
GO(gdk_window_get_parent, pFp)
|
||||
GO(gdk_window_get_pointer, pFpppp)
|
||||
GO(gdk_window_get_position, vFppp)
|
||||
GO(gdk_window_get_root_coords, vFpiipp)
|
||||
GO(gdk_window_get_root_origin, vFppp)
|
||||
GO(gdk_window_get_screen, pFp)
|
||||
GO(gdk_window_get_state, iFp)
|
||||
GO(gdk_window_get_toplevel, pFp)
|
||||
GO(gdk_window_get_toplevels, pFp)
|
||||
GO(gdk_window_get_type_hint, iFp)
|
||||
GO(gdk_window_get_update_area, pFp)
|
||||
GO(gdk_window_get_user_data, vFpp)
|
||||
GO(gdk_window_get_visual, pFp)
|
||||
GO(gdk_window_get_width, iFp)
|
||||
GO(gdk_window_get_window_type, iFp)
|
||||
GO(gdk_window_has_native, iFp)
|
||||
GO(gdk_window_hide, vFp)
|
||||
GO(gdk_window_hints_get_type, iFv)
|
||||
GO(gdk_window_iconify, vFp)
|
||||
GO(gdk_window_impl_get_type, iFv)
|
||||
GO(gdk_window_impl_x11_get_type, iFv)
|
||||
GO(gdk_window_input_shape_combine_mask, vFppii)
|
||||
GO(gdk_window_input_shape_combine_region, vFppii)
|
||||
//GOM(gdk_window_invalidate_maybe_recurse, vFEppBp)
|
||||
GO(gdk_window_invalidate_rect, vFppi)
|
||||
GO(gdk_window_invalidate_region, vFppi)
|
||||
GO(gdk_window_is_destroyed, iFp)
|
||||
GO(gdk_window_is_input_only, iFp)
|
||||
GO(gdk_window_is_shaped, iFp)
|
||||
GO(gdk_window_is_viewable, iFp)
|
||||
GO(gdk_window_is_visible, iFp)
|
||||
GO(gdk_window_lookup, pFp)
|
||||
GO(gdk_window_lookup_for_display, pFpp)
|
||||
GO(gdk_window_lower, vFp)
|
||||
GO(gdk_window_maximize, vFp)
|
||||
GO(gdk_window_merge_child_input_shapes, vFp)
|
||||
GO(gdk_window_merge_child_shapes, vFp)
|
||||
GO(gdk_window_move, vFpii)
|
||||
GO(gdk_window_move_region, vFppii)
|
||||
GO(gdk_window_move_resize, vFpiiii)
|
||||
GO(gdk_window_new, pFppi)
|
||||
GO(gdk_window_object_get_type, iFv)
|
||||
GO(gdk_window_peek_children, pFp)
|
||||
GO(gdk_window_process_all_updates, vFv)
|
||||
GO(gdk_window_process_updates, vFpi)
|
||||
GO(gdk_window_raise, vFp)
|
||||
GO(gdk_window_redirect_to_drawable, vFppiiiiii)
|
||||
GO(gdk_window_register_dnd, vFp)
|
||||
GOM(gdk_window_remove_filter, vFEppp)
|
||||
GO(gdk_window_remove_redirection, vFp)
|
||||
GO(gdk_window_reparent, vFppii)
|
||||
GO(gdk_window_resize, vFpii)
|
||||
GO(gdk_window_restack, vFppi)
|
||||
GO(gdk_window_scroll, vFpii)
|
||||
GO(gdk_window_set_accept_focus, vFpi)
|
||||
GO(gdk_window_set_background, vFpp)
|
||||
GO(gdk_window_set_back_pixmap, vFppi)
|
||||
GO(gdk_window_set_child_input_shapes, vFp)
|
||||
GO(gdk_window_set_child_shapes, vFp)
|
||||
GO(gdk_window_set_composited, vFpi)
|
||||
GO(gdk_window_set_cursor, vFpp)
|
||||
GO(gdk_window_set_debug_updates, vFi)
|
||||
GO(gdk_window_set_decorations, vFpp)
|
||||
GO(gdk_window_set_events, vFpp)
|
||||
GO(gdk_window_set_focus_on_map, vFpi)
|
||||
GO(gdk_window_set_functions, vFpu)
|
||||
GO(gdk_window_set_geometry_hints, vFppi)
|
||||
GO(gdk_window_set_group, vFpp)
|
||||
GO(gdk_window_set_hints, vFpiiiiiii)
|
||||
GO(gdk_window_set_icon, vFpppp)
|
||||
GO(gdk_window_set_icon_list, vFpp)
|
||||
GO(gdk_window_set_icon_name, vFpp)
|
||||
GO(gdk_window_set_keep_above, vFpi)
|
||||
GO(gdk_window_set_keep_below, vFpi)
|
||||
GO(gdk_window_set_modal_hint, iFp)
|
||||
GO(gdk_window_set_opacity, vFpi)
|
||||
GO(gdk_window_set_override_redirect, vFpi)
|
||||
GO(gdk_window_set_role, vFpp)
|
||||
GO(gdk_window_set_skip_pager_hint, vFpi)
|
||||
GO(gdk_window_set_skip_taskbar_hint, vFpi)
|
||||
GO(gdk_window_set_startup_id, vFpp)
|
||||
GO(gdk_window_set_static_gravities, iFpi)
|
||||
GO(gdk_window_set_title, vFpp)
|
||||
GO(gdk_window_set_transient_for, vFpp)
|
||||
GO(gdk_window_set_type_hint, vFpi)
|
||||
GO(gdk_window_set_urgency_hint, vFpi)
|
||||
GO(gdk_window_set_user_data, vFpp)
|
||||
GO(gdk_window_shape_combine_mask, vFppii)
|
||||
GO(gdk_window_shape_combine_region, vFppii)
|
||||
GO(gdk_window_show, vFp)
|
||||
GO(gdk_window_show_unraised, vFp)
|
||||
GO(gdk_window_state_get_type, iFv)
|
||||
GO(gdk_window_stick, vFp)
|
||||
//GO(gdk_window_thaw_toplevel_updates_libgtk_only,
|
||||
GO(gdk_window_thaw_updates, vFp)
|
||||
GO(gdk_window_type_get_type, iFv)
|
||||
GO(gdk_window_type_hint_get_type, iFv)
|
||||
GO(gdk_window_unfullscreen, vFp)
|
||||
GO(gdk_window_unmaximize, vFp)
|
||||
GO(gdk_window_unstick, vFp)
|
||||
GO(gdk_window_withdraw, vFp)
|
||||
GO(gdk_wm_decoration_get_type, iFv)
|
||||
GO(gdk_wm_function_get_type, iFv)
|
||||
GO(gdk_x11_atom_to_xatom, pFp)
|
||||
GO(gdk_x11_atom_to_xatom_for_display, pFpp)
|
||||
GO(gdk_x11_colormap_foreign_new, pFpp)
|
||||
GO(gdk_x11_colormap_get_xcolormap, pFp)
|
||||
GO(gdk_x11_colormap_get_xdisplay, pFp)
|
||||
GO(gdk_x11_cursor_get_xcursor, pFp)
|
||||
GO(gdk_x11_cursor_get_xdisplay, pFp)
|
||||
GO(gdk_x11_display_broadcast_startup_message, vFppppppppppppp) //vaarg after 2 p
|
||||
GO(gdk_x11_display_get_startup_notification_id, pFp)
|
||||
GO(gdk_x11_display_get_type, iFv)
|
||||
GO(gdk_x11_display_get_user_time, uFp)
|
||||
GO(gdk_x11_display_get_xdisplay, pFp)
|
||||
GO(gdk_x11_window_get_xid, pFp)
|
||||
GO(gdk_x11_display_grab, vFp)
|
||||
GO(gdk_x11_display_set_cursor_theme, vFppi)
|
||||
//GO(gdk_x11_display_string_to_compound_text,
|
||||
//GO(gdk_x11_display_text_property_to_text_list,
|
||||
GO(gdk_x11_display_ungrab, vFp)
|
||||
//GO(gdk_x11_display_utf8_to_compound_text,
|
||||
GO(gdk_x11_drawable_get_xdisplay, pFp)
|
||||
GO(gdk_x11_drawable_get_xid, pFp)
|
||||
GO(gdk_x11_font_get_name, pFp)
|
||||
GO(gdk_x11_font_get_xdisplay, pFp)
|
||||
GO(gdk_x11_font_get_xfont, pFp)
|
||||
//GO(gdk_x11_free_compound_text,
|
||||
//GO(gdk_x11_free_text_list,
|
||||
GO(gdk_x11_gc_get_xdisplay, pFp)
|
||||
GO(gdk_x11_gc_get_xgc, pFp)
|
||||
GO(gdk_x11_get_default_root_xwindow, pFv)
|
||||
GO(gdk_x11_get_default_screen, iFv)
|
||||
GO(gdk_x11_get_default_xdisplay, pFv)
|
||||
GO(gdk_x11_get_server_time, uFp)
|
||||
GO(gdk_x11_get_xatom_by_name, pFp)
|
||||
GO(gdk_x11_get_xatom_by_name_for_display, pFpp)
|
||||
GO(gdk_x11_get_xatom_name, pFp)
|
||||
GO(gdk_x11_get_xatom_name_for_display, pFpp)
|
||||
GO(gdk_x11_grab_server, vFv)
|
||||
GO(gdk_x11_image_get_xdisplay, pFp)
|
||||
GO(gdk_x11_image_get_ximage, pFp)
|
||||
GO(gdk_x11_lookup_xdisplay, pFp)
|
||||
GO(gdk_x11_pixmap_get_drawable_impl, pFp)
|
||||
GO(gdk_x11_register_standard_event_type, vFpii)
|
||||
GO(gdk_x11_screen_get_monitor_output, pFpi)
|
||||
GO(gdk_x11_screen_get_screen_number, iFp)
|
||||
GO(gdk_x11_screen_get_window_manager_name, pFp)
|
||||
GO(gdk_x11_screen_get_xscreen, pFp)
|
||||
GO(gdk_x11_screen_lookup_visual, pFpp)
|
||||
GO(gdk_x11_screen_supports_net_wm_hint, iFpp)
|
||||
GO(gdk_x11_set_sm_client_id, vFp)
|
||||
GO(gdk_x11_ungrab_server, vFv)
|
||||
GO(gdk_x11_visual_get_xvisual, pFp)
|
||||
GO(gdk_x11_window_foreign_new_for_display, pFpp)
|
||||
GO(gdk_x11_window_get_drawable_impl, pFp)
|
||||
GO(gdk_x11_window_lookup_for_display, pFpp)
|
||||
GO(gdk_x11_window_move_to_current_desktop, vFp)
|
||||
GO(gdk_x11_window_set_user_time, vFpu)
|
||||
GO(gdk_x11_xatom_to_atom, pFp)
|
||||
GO(gdk_x11_xatom_to_atom_for_display, pFpp)
|
||||
GO(gdkx_colormap_get, pFu)
|
||||
GO(gdk_xid_table_lookup, pFp)
|
||||
GO(gdk_xid_table_lookup_for_display, pFpp)
|
||||
GO(gdkx_visual_get, pFp)
|
||||
|
||||
DATA(gdk_display, 4) // no hack here...
|
||||
DATA(gdk_threads_lock, 4)
|
||||
DATA(gdk_threads_unlock, 4)
|
||||
|
||||
GO(dummy_set_child_property, vFppupp) // to get vFppupp for gtkclass.c
|
||||
+147
-140
@@ -197,19 +197,19 @@ GO(g_charset_converter_get_type, iFv)
|
||||
//GO(g_charset_converter_get_use_fallback,
|
||||
//GO(g_charset_converter_new,
|
||||
//GO(g_charset_converter_set_use_fallback,
|
||||
//GO(g_content_type_can_be_executable,
|
||||
//GO(g_content_type_equals,
|
||||
//GO(g_content_type_from_mime_type,
|
||||
//GO(g_content_type_get_description,
|
||||
//GO(g_content_type_get_generic_icon_name,
|
||||
//GO(g_content_type_get_icon,
|
||||
//GO(g_content_type_get_mime_type,
|
||||
//GO(g_content_type_get_symbolic_icon,
|
||||
//GO(g_content_type_guess,
|
||||
//GO(g_content_type_guess_for_tree,
|
||||
//GO(g_content_type_is_a,
|
||||
//GO(g_content_type_is_unknown,
|
||||
//GO(g_content_types_get_registered,
|
||||
GO(g_content_type_can_be_executable, iFp)
|
||||
GO(g_content_type_equals, iFpp)
|
||||
GO(g_content_type_from_mime_type, pFp)
|
||||
GO(g_content_type_get_description, pFp)
|
||||
GO(g_content_type_get_generic_icon_name, pFp)
|
||||
GO(g_content_type_get_icon, pFp)
|
||||
GO(g_content_type_get_mime_type, pFp)
|
||||
GO(g_content_type_get_symbolic_icon, pFp)
|
||||
GO(g_content_type_guess, pFppLp)
|
||||
GO(g_content_type_guess_for_tree, pFp)
|
||||
GO(g_content_type_is_a, iFpp)
|
||||
GO(g_content_type_is_unknown, iFp)
|
||||
GO(g_content_types_get_registered, pFv)
|
||||
//GO(g_converter_convert,
|
||||
//GO(g_converter_flags_get_type,
|
||||
//GO(g_converter_get_type,
|
||||
@@ -622,9 +622,9 @@ GO(g_desktop_app_info_set_desktop_env, vFp)
|
||||
//GO(g_emblem_new,
|
||||
//GO(g_emblem_new_with_origin,
|
||||
//GO(g_emblem_origin_get_type,
|
||||
//GO(g_file_append_to,
|
||||
//GO(g_file_append_to_async,
|
||||
//GO(g_file_append_to_finish,
|
||||
GO(g_file_append_to, pFpipp)
|
||||
//GOM(g_file_append_to_async, vFEpiipBp)
|
||||
GO(g_file_append_to_finish, pFppp)
|
||||
//GO(g_file_attribute_info_flags_get_type,
|
||||
//GO(g_file_attribute_info_list_add,
|
||||
//GO(g_file_attribute_info_list_dup,
|
||||
@@ -645,31 +645,31 @@ GO(g_desktop_app_info_set_desktop_env, vFp)
|
||||
//GO(g_file_attribute_matcher_unref,
|
||||
//GO(g_file_attribute_status_get_type,
|
||||
//GO(g_file_attribute_type_get_type,
|
||||
//GO(g_file_copy,
|
||||
//GO(g_file_copy_async,
|
||||
//GO(g_file_copy_attributes,
|
||||
//GO(g_file_copy_finish,
|
||||
//GO(g_file_copy_flags_get_type,
|
||||
//GO(g_file_create,
|
||||
//GO(g_file_create_async,
|
||||
//GO(g_file_create_finish,
|
||||
//GO(g_file_create_flags_get_type,
|
||||
//GO(g_file_create_readwrite,
|
||||
//GO(g_file_create_readwrite_async,
|
||||
//GO(g_file_create_readwrite_finish,
|
||||
//GO(g_file_delete,
|
||||
//GO(g_file_delete_async,
|
||||
//GO(g_file_delete_finish,
|
||||
//GOM(g_file_copy, iFEppipBpp)
|
||||
//GOM(g_file_copy_async, vFEppiipBpBp)
|
||||
GO(g_file_copy_attributes, iFppipp)
|
||||
GO(g_file_copy_finish, iFppp)
|
||||
GO(g_file_copy_flags_get_type, iFv)
|
||||
GO(g_file_create, pFpipp)
|
||||
//GOM(g_file_create_async, vFEpiipBp)
|
||||
GO(g_file_create_finish, pFppp)
|
||||
GO(g_file_create_flags_get_type, iFv)
|
||||
GO(g_file_create_readwrite, pFpipp)
|
||||
//GOM(g_file_create_readwrite_async, vFEpiipBp)
|
||||
GO(g_file_create_readwrite_finish, pFppp)
|
||||
GO(g_file_delete, iFppp)
|
||||
//GOM(g_file_delete_async, vFEpipBp)
|
||||
GO(g_file_delete_finish, pFppp)
|
||||
//GO(g_file_descriptor_based_get_fd,
|
||||
//GO(g_file_descriptor_based_get_type,
|
||||
//GO(g_file_dup,
|
||||
//GO(g_file_eject_mountable,
|
||||
//GO(g_file_eject_mountable_finish,
|
||||
//GO(g_file_eject_mountable_with_operation,
|
||||
//GO(g_file_eject_mountable_with_operation_finish,
|
||||
//GO(g_file_enumerate_children,
|
||||
//GO(g_file_enumerate_children_async,
|
||||
//GO(g_file_enumerate_children_finish,
|
||||
GO(g_file_dup, pFp)
|
||||
//GOM(g_file_eject_mountable, vFEpipBp)
|
||||
GO(g_file_eject_mountable_finish, iFppp)
|
||||
//GOM(g_file_eject_mountable_with_operation, vFpippBp)
|
||||
GO(g_file_eject_mountable_with_operation_finish, iFppp)
|
||||
GO(g_file_enumerate_children, pFppipp)
|
||||
//GOM(g_file_enumerate_children_async, vFppiipBp)
|
||||
GO(g_file_enumerate_children_finish, pFppp)
|
||||
//GO(g_file_enumerator_close,
|
||||
//GO(g_file_enumerator_close_async,
|
||||
//GO(g_file_enumerator_close_finish,
|
||||
@@ -682,24 +682,24 @@ GO(g_desktop_app_info_set_desktop_env, vFp)
|
||||
//GO(g_file_enumerator_next_files_async,
|
||||
//GO(g_file_enumerator_next_files_finish,
|
||||
//GO(g_file_enumerator_set_pending,
|
||||
//GO(g_file_equal,
|
||||
//GO(g_file_find_enclosing_mount,
|
||||
//GO(g_file_find_enclosing_mount_async,
|
||||
//GO(g_file_find_enclosing_mount_finish,
|
||||
//GO(g_file_get_basename,
|
||||
//GO(g_file_get_child,
|
||||
//GO(g_file_get_child_for_display_name,
|
||||
//GO(g_file_get_parent,
|
||||
//GO(g_file_get_parse_name,
|
||||
//GO(g_file_get_path,
|
||||
//GO(g_file_get_relative_path,
|
||||
//GO(g_file_get_type,
|
||||
//GO(g_file_get_uri,
|
||||
//GO(g_file_get_uri_scheme,
|
||||
//GO(g_file_hash,
|
||||
//GO(g_file_has_parent,
|
||||
//GO(g_file_has_prefix,
|
||||
//GO(g_file_has_uri_scheme,
|
||||
GO(g_file_equal, iFpp)
|
||||
GO(g_file_find_enclosing_mount, pFppp)
|
||||
//GOM(g_file_find_enclosing_mount_async, vFEpipBp)
|
||||
GO(g_file_find_enclosing_mount_finish, pFppp)
|
||||
GO(g_file_get_basename, pFp)
|
||||
GO(g_file_get_child, pFpp)
|
||||
GO(g_file_get_child_for_display_name, pFppp)
|
||||
GO(g_file_get_parent, pFp)
|
||||
GO(g_file_get_parse_name, pFp)
|
||||
GO(g_file_get_path, pFp)
|
||||
GO(g_file_get_relative_path, pFpp)
|
||||
GO(g_file_get_type, iFv)
|
||||
GO(g_file_get_uri, pFp)
|
||||
GO(g_file_get_uri_scheme, pFp)
|
||||
GO(g_file_hash, uFp)
|
||||
GO(g_file_has_parent, iFpp)
|
||||
GO(g_file_has_prefix, iFpp)
|
||||
GO(g_file_has_uri_scheme, iFpp)
|
||||
GO(g_file_icon_get_file, pFp)
|
||||
GO(g_file_icon_get_type, iFv)
|
||||
GO(g_file_icon_new, pFp)
|
||||
@@ -776,110 +776,117 @@ GO(g_file_icon_new, pFp)
|
||||
//GO(g_file_io_stream_query_info,
|
||||
//GO(g_file_io_stream_query_info_async,
|
||||
//GO(g_file_io_stream_query_info_finish,
|
||||
//GO(g_file_is_native,
|
||||
//GO(g_file_load_contents,
|
||||
//GO(g_file_load_contents_async,
|
||||
//GO(g_file_load_contents_finish,
|
||||
//GO(g_file_load_partial_contents_async,
|
||||
//GO(g_file_load_partial_contents_finish,
|
||||
//GO(g_file_make_directory,
|
||||
//GO(g_file_make_directory_async,
|
||||
//GO(g_file_make_directory_finish,
|
||||
//GO(g_file_make_directory_with_parents,
|
||||
//GO(g_file_make_symbolic_link,
|
||||
//GO(g_file_measure_disk_usage,
|
||||
//GO(g_file_measure_disk_usage_async,
|
||||
//GO(g_file_measure_disk_usage_finish,
|
||||
GO(g_file_is_native, iFpp)
|
||||
GO(g_file_load_bytes, pFpppp) //sice 2.56+
|
||||
//GOM(g_file_load_bytes_async, vFEppBp) //since 2.56+
|
||||
GO(g_file_load_bytes_finish, pFpppp) //since 2.56+
|
||||
GO(g_file_load_contents, iFpppppp)
|
||||
//GOM(g_file_load_contents_async, vFEppBp)
|
||||
GO(g_file_load_contents_finish, iFpppppp)
|
||||
//GOM(g_file_load_partial_contents_async, vFppBBp)
|
||||
GO(g_file_load_partial_contents_finish, iFpppppp)
|
||||
GO(g_file_make_directory, iFppp)
|
||||
//GOM(g_file_make_directory_async, vFEpipBp)
|
||||
GO(g_file_make_directory_finish, iFppp)
|
||||
GO(g_file_make_directory_with_parents, iFppp)
|
||||
GO(g_file_make_symbolic_link, iFpppp)
|
||||
//GOM(g_file_measure_disk_usage, iFEpipBppppp)
|
||||
//GOM(g_file_measure_disk_usage_async, vFEpiipBpBp)
|
||||
GO(g_file_measure_disk_usage_finish, iFpppppp)
|
||||
//GO(g_file_measure_flags_get_type,
|
||||
//GO(g_file_monitor,
|
||||
GO(g_file_monitor, pFpipp)
|
||||
//GO(g_file_monitor_cancel,
|
||||
//GO(g_file_monitor_directory,
|
||||
GO(g_file_monitor_directory, pFpipp)
|
||||
//GO(g_file_monitor_emit_event,
|
||||
//GO(g_file_monitor_event_get_type,
|
||||
//GO(g_file_monitor_file,
|
||||
GO(g_file_monitor_file, pFpipp)
|
||||
//GO(g_file_monitor_flags_get_type,
|
||||
//GO(g_file_monitor_get_type,
|
||||
//GO(g_file_monitor_is_cancelled,
|
||||
//GO(g_file_monitor_set_rate_limit,
|
||||
//GO(g_file_mount_enclosing_volume,
|
||||
//GO(g_file_mount_enclosing_volume_finish,
|
||||
//GO(g_file_mount_mountable,
|
||||
//GO(g_file_mount_mountable_finish,
|
||||
//GO(g_file_move,
|
||||
//GOM(g_file_mount_enclosing_volume, vFEpippBp)
|
||||
GO(g_file_mount_enclosing_volume_finish, iFppp)
|
||||
//GOM(g_file_mount_mountable, vFEpippBp)
|
||||
GO(g_file_mount_mountable_finish, pFppp)
|
||||
//GOM(g_file_move, iFEppipBpp)
|
||||
//GO(g_filename_completer_get_completions,
|
||||
//GO(g_filename_completer_get_completion_suffix,
|
||||
//GO(g_filename_completer_get_type,
|
||||
//GO(g_filename_completer_new,
|
||||
//GO(g_filename_completer_set_dirs_only,
|
||||
//GO(g_file_new_for_commandline_arg,
|
||||
//GO(g_file_new_for_commandline_arg_and_cwd,
|
||||
//GO(g_file_new_for_path,
|
||||
//GO(g_file_new_for_uri,
|
||||
//GO(g_file_new_tmp,
|
||||
//GO(g_file_open_readwrite,
|
||||
//GO(g_file_open_readwrite_async,
|
||||
//GO(g_file_open_readwrite_finish,
|
||||
GO(g_file_new_build_filename, pFppppppppppp) // vaarg, since v2.56+
|
||||
GO(g_file_new_for_commandline_arg, pFp)
|
||||
GO(g_file_new_for_commandline_arg_and_cwd, pFpp)
|
||||
GO(g_file_new_for_path, pFp)
|
||||
GO(g_file_new_for_uri, pFp)
|
||||
GO(g_file_new_tmp, pFppp)
|
||||
GO(g_file_open_readwrite, pFppp)
|
||||
//GOM(g_file_open_readwrite_async, vFEpipBp)
|
||||
GO(g_file_open_readwrite_finish, pFppp)
|
||||
//GO(g_file_output_stream_get_etag,
|
||||
//GO(g_file_output_stream_get_type,
|
||||
//GO(g_file_output_stream_query_info,
|
||||
//GO(g_file_output_stream_query_info_async,
|
||||
//GO(g_file_output_stream_query_info_finish,
|
||||
//GO(g_file_parse_name,
|
||||
//GO(g_file_poll_mountable,
|
||||
//GO(g_file_poll_mountable_finish,
|
||||
//GO(g_file_query_default_handler,
|
||||
//GO(g_file_query_exists,
|
||||
//GO(g_file_query_filesystem_info,
|
||||
//GO(g_file_query_filesystem_info_async,
|
||||
//GO(g_file_query_filesystem_info_finish,
|
||||
//GO(g_file_query_file_type,
|
||||
//GO(g_file_query_info,
|
||||
//GO(g_file_query_info_async,
|
||||
//GO(g_file_query_info_finish,
|
||||
GO(g_file_parse_name, pFp)
|
||||
GO(g_file_peek_path , pFp) // sice 2.56+
|
||||
//GOM(g_file_poll_mountable, vFEppBp)
|
||||
GO(g_file_poll_mountable_finish, iFppp)
|
||||
GO(g_file_query_default_handler, pFppp)
|
||||
//GOMg_file_query_default_handler_async, vFEpipBp) //since 2.60+
|
||||
GO(g_file_query_default_handler_finish, pFppp) //since 2.60+
|
||||
GO(g_file_query_exists, iFpp)
|
||||
GO(g_file_query_filesystem_info, pFpppp)
|
||||
//GOM(g_file_query_filesystem_info_async, vFEppipBp)
|
||||
GO(g_file_query_filesystem_info_finish, pFppp)
|
||||
GO(g_file_query_file_type, iFpip)
|
||||
GO(g_file_query_info, pFppipp)
|
||||
//GOM(g_file_query_info_async, vFEppiipBp)
|
||||
GO(g_file_query_info_finish, pFppp)
|
||||
//GO(g_file_query_info_flags_get_type,
|
||||
//GO(g_file_query_settable_attributes,
|
||||
//GO(g_file_query_writable_namespaces,
|
||||
//GO(g_file_read,
|
||||
//GO(g_file_read_async,
|
||||
//GO(g_file_read_finish,
|
||||
//GO(g_file_replace,
|
||||
//GO(g_file_replace_async,
|
||||
//GO(g_file_replace_contents,
|
||||
//GO(g_file_replace_contents_async,
|
||||
//GO(g_file_replace_contents_bytes_async,
|
||||
//GO(g_file_replace_contents_finish,
|
||||
GO(g_file_query_settable_attributes, pFppp)
|
||||
GO(g_file_query_writable_namespaces, pFppp)
|
||||
GO(g_file_read, pFppp)
|
||||
//GOM(g_file_read_async, vFEpipBp)
|
||||
GO(g_file_read_finish, pFppp)
|
||||
GO(g_file_replace, pFppiipp)
|
||||
//GOM(g_file_replace_async, vFEppiiipBp)
|
||||
GO(g_file_replace_contents, iFppLpiippp)
|
||||
//GOM(g_file_replace_contents_async, vFEppLpuupBp)
|
||||
//GOM(g_file_replace_contents_bytes_async, vFEpppiipBp)
|
||||
GO(g_file_replace_contents_finish, iFpppp)
|
||||
//GO(g_file_replace_finish,
|
||||
//GO(g_file_replace_readwrite,
|
||||
//GO(g_file_replace_readwrite_async,
|
||||
//GO(g_file_replace_readwrite_finish,
|
||||
//GO(g_file_resolve_relative_path,
|
||||
//GO(g_file_set_attribute,
|
||||
//GO(g_file_set_attribute_byte_string,
|
||||
//GO(g_file_set_attribute_int32,
|
||||
//GO(g_file_set_attribute_int64,
|
||||
//GO(g_file_set_attributes_async,
|
||||
//GO(g_file_set_attributes_finish,
|
||||
//GO(g_file_set_attributes_from_info,
|
||||
//GO(g_file_set_attribute_string,
|
||||
//GO(g_file_set_attribute_uint32,
|
||||
//GO(g_file_set_attribute_uint64,
|
||||
//GO(g_file_set_display_name,
|
||||
//GO(g_file_set_display_name_async,
|
||||
//GO(g_file_set_display_name_finish,
|
||||
//GO(g_file_start_mountable,
|
||||
//GO(g_file_start_mountable_finish,
|
||||
//GO(g_file_stop_mountable,
|
||||
//GO(g_file_stop_mountable_finish,
|
||||
//GO(g_file_supports_thread_contexts,
|
||||
GO(g_file_replace_readwrite, pFppiipp)
|
||||
//GOM(g_file_replace_readwrite_async, vFEppiiipBp)
|
||||
GO(g_file_replace_readwrite_finish, pFppp)
|
||||
GO(g_file_resolve_relative_path, pFpp)
|
||||
GO(g_file_set_attribute, iFppipipp)
|
||||
GO(g_file_set_attribute_byte_string, iFpppipp)
|
||||
GO(g_file_set_attribute_int32, iFppiipp)
|
||||
GO(g_file_set_attribute_int64, iFppIipp)
|
||||
//GOM(g_file_set_attributes_async, vFEppiipBp)
|
||||
GO(g_file_set_attributes_finish, iFpppp)
|
||||
GO(g_file_set_attributes_from_info, iFppipp)
|
||||
GO(g_file_set_attribute_string, iFpppipp)
|
||||
GO(g_file_set_attribute_uint32, iFppuipp)
|
||||
GO(g_file_set_attribute_uint64, iFppUipp)
|
||||
GO(g_file_set_display_name, pFpppp)
|
||||
//GOM(g_file_set_display_name_async, vFEppipBp)
|
||||
GO(g_file_set_display_name_finish, pFppp)
|
||||
//GOM(g_file_start_mountable, vFEpippBp)
|
||||
GO(g_file_start_mountable_finish, iFppp)
|
||||
//GOM(g_file_stop_mountable, vFpippBp)
|
||||
GO(g_file_stop_mountable_finish, iFppp)
|
||||
GO(g_file_supports_thread_contexts, iFp)
|
||||
//GO(g_filesystem_preview_type_get_type,
|
||||
//GO(g_file_trash,
|
||||
//GO(g_file_trash_async,
|
||||
//GO(g_file_trash_finish,
|
||||
//GO(g_file_type_get_type,
|
||||
//GO(g_file_unmount_mountable,
|
||||
//GO(g_file_unmount_mountable_finish,
|
||||
//GO(g_file_unmount_mountable_with_operation,
|
||||
//GO(g_file_unmount_mountable_with_operation_finish,
|
||||
GO(g_file_trash, iFppp)
|
||||
//GOM(g_file_trash_async, vFEpipBp)
|
||||
GO(g_file_trash_finish, pFppp)
|
||||
GO(g_file_type_get_type, iFv)
|
||||
//GOM(g_file_unmount_mountable, vFEpipBp)
|
||||
GO(g_file_unmount_mountable_finish, iFppp)
|
||||
//GOM(g_file_unmount_mountable_with_operation, vFEpippBp)
|
||||
GO(g_file_unmount_mountable_with_operation_finish, iFppp)
|
||||
//GO(g_filter_input_stream_get_base_stream,
|
||||
//GO(g_filter_input_stream_get_close_base_stream,
|
||||
//GO(g_filter_input_stream_get_type,
|
||||
|
||||
@@ -40,6 +40,7 @@ typedef void (*vFppp_t)(void*, void*, void*);
|
||||
typedef uint32_t (*uFupp_t)(uint32_t, void*, void*);
|
||||
typedef void* (*pFppp_t)(void*, void*, void*);
|
||||
typedef void* (*pFppip_t)(void*, void*, int, void*);
|
||||
typedef uint32_t (*uFpipp_t)(void*, int, void*, void*);
|
||||
typedef uint32_t (*uFuppp_t)(uint32_t, void*, void*, void*);
|
||||
typedef uint32_t (*uFippp_t)(int, void*, void*, void*);
|
||||
typedef uint32_t (*uFiuppp_t)(int, uint32_t, void*, void*, void*);
|
||||
@@ -50,6 +51,7 @@ typedef void (*vFpupp_t)(void*, uint32_t, void*, void*);
|
||||
typedef int (*iFpLpp_t)(void*, unsigned long, void*, void*);
|
||||
typedef void* (*pFpupp_t)(void*, uint32_t, void*, void*);
|
||||
typedef uint32_t (*uFiippp_t)(int, int, void*, void*, void*);
|
||||
typedef uint32_t (*uFpiippp_t)(void*, int, int, void*, void*, void*);
|
||||
typedef int (*iFpupppp_t)(void*, uint32_t, void*, void*, void*, void*);
|
||||
typedef void* (*pFppuipp_t)(void*, void*, uint32_t, int32_t, void*, void*);
|
||||
typedef void* (*pFppLiiip_t)(void*, void*, unsigned long, int, int, int, void*);
|
||||
@@ -117,6 +119,20 @@ typedef int (*iFpppippppppp_t)(void*, void*, void*, int, void*, void*, void*, vo
|
||||
GO(g_completion_new, pFp_t) \
|
||||
GO(g_completion_set_compare, vFpp_t) \
|
||||
GO(g_log_set_default_handler, pFpp_t) \
|
||||
GO(g_io_add_watch, uFpipp_t) \
|
||||
GO(g_io_add_watch_full, uFpiippp_t) \
|
||||
GO(g_set_print_handler, pFp_t) \
|
||||
GO(g_set_printerr_handler, pFp_t) \
|
||||
GO(g_slist_sort, pFpp_t) \
|
||||
GO(g_slist_sort_with_data, pFppp_t) \
|
||||
GO(g_build_pathv, pFpp_t) \
|
||||
GO(g_list_sort, pFpp_t) \
|
||||
GO(g_list_sort_with_data, pFppp_t) \
|
||||
GO(g_queue_find_custom, pFppp_t) \
|
||||
GO(g_list_find_custom, pFppp_t) \
|
||||
GO(g_timeout_add_seconds, uFupp_t) \
|
||||
GO(g_timeout_add_seconds_full, uFiuppp_t) \
|
||||
|
||||
|
||||
typedef struct glib2_my_s {
|
||||
// functions
|
||||
@@ -526,6 +542,28 @@ static void* findGCompareFuncFct(void* fct)
|
||||
printf_log(LOG_NONE, "Warning, no more slot for glib2 GCompareFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
// GCompareDataFunc ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GCompareDataFunc_fct_##A = 0; \
|
||||
static int my_GCompareDataFunc_##A(void* a, void* b, void* data) \
|
||||
{ \
|
||||
return (int)RunFunction(my_context, my_GCompareDataFunc_fct_##A, 3, a, b, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGCompareDataFuncFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_GCompareDataFunc_fct_##A == (uintptr_t)fct) return my_GCompareDataFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_GCompareDataFunc_fct_##A == 0) {my_GCompareDataFunc_fct_##A = (uintptr_t)fct; return my_GCompareDataFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for glib2 GCompareDataFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
// GCompletionFunc ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GCompletionFunc_fct_##A = 0; \
|
||||
@@ -570,6 +608,28 @@ static void* findGCompletionStrncmpFuncFct(void* fct)
|
||||
printf_log(LOG_NONE, "Warning, no more slot for glib2 GCompletionStrncmpFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
// GIOFunc ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GIOFunc_fct_##A = 0; \
|
||||
static int my_GIOFunc_##A(void* a, int b, void* c) \
|
||||
{ \
|
||||
return (int)RunFunction(my_context, my_GIOFunc_fct_##A, 3, a, b, c); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGIOFuncFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_GIOFunc_fct_##A == (uintptr_t)fct) return my_GIOFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_GIOFunc_fct_##A == 0) {my_GIOFunc_fct_##A = (uintptr_t)fct; return my_GIOFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for glib2 GIOFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
// GLogFunc ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GLogFunc_fct_##A = 0; \
|
||||
@@ -600,6 +660,36 @@ static void* reverseGLogFuncFct(void* fct)
|
||||
#undef GO
|
||||
return NULL;
|
||||
}
|
||||
// GPrintFunc ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GPrintFunc_fct_##A = 0; \
|
||||
static void my_GPrintFunc_##A(void* a) \
|
||||
{ \
|
||||
RunFunction(my_context, my_GPrintFunc_fct_##A, 1, a); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGPrintFuncFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_GPrintFunc_fct_##A == (uintptr_t)fct) return my_GPrintFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_GPrintFunc_fct_##A == 0) {my_GPrintFunc_fct_##A = (uintptr_t)fct; return my_GPrintFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for glib2 GPrintFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
static void* reverseGPrintFuncFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
#define GO(A) if((uintptr_t)fct == my_GPrintFunc_fct_##A) return (void*)my_GPrintFunc_fct_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#undef SUPER
|
||||
|
||||
@@ -1151,6 +1241,117 @@ EXPORT void* my_g_log_set_default_handler(x86emu_t *emu, void* f, void* data)
|
||||
return reverseGLogFuncFct(my->g_log_set_default_handler(findGLogFuncFct(f), data));
|
||||
}
|
||||
|
||||
EXPORT uint32_t my_g_io_add_watch_full(x86emu_t* emu, void* channel, int priority, int cond, void* f, void* data, void* notify)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_io_add_watch_full(channel, priority, cond, findGIOFuncFct(f), data, findDestroyFct(notify));
|
||||
}
|
||||
|
||||
EXPORT uint32_t my_g_io_add_watch(x86emu_t* emu, void* channel, int cond, void* f, void* data)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_io_add_watch(channel, cond, findGIOFuncFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void* my_g_set_print_handler(x86emu_t *emu, void* f)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return reverseGPrintFuncFct(my->g_set_print_handler(findGPrintFuncFct(f)));
|
||||
}
|
||||
|
||||
EXPORT void* my_g_set_printerr_handler(x86emu_t *emu, void* f)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return reverseGPrintFuncFct(my->g_set_printerr_handler(findGPrintFuncFct(f)));
|
||||
}
|
||||
|
||||
EXPORT void* my_g_slist_sort(x86emu_t *emu, void* list, void* f)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_slist_sort(list, findGCompareFuncFct(f));
|
||||
}
|
||||
|
||||
EXPORT void* my_g_slist_sort_with_data(x86emu_t *emu, void* list, void* f, void* data)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_slist_sort_with_data(list, findGCompareDataFuncFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void* my_g_build_path(x86emu_t *emu, void* sep, void* first, void** data)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
int n = (first)?1:0;
|
||||
void* p = n?data[0]:NULL;
|
||||
while(p) {
|
||||
p = data[n++];
|
||||
}
|
||||
++n; // final NULL
|
||||
void** args = (void**)malloc(n *sizeof(void*));
|
||||
args[0] = first;
|
||||
for(int i=1; i<n; ++i)
|
||||
args[i] = data[i-1];
|
||||
p = my->g_build_pathv(sep, args);
|
||||
free(args);
|
||||
return p;
|
||||
}
|
||||
|
||||
EXPORT void* my_g_list_sort(x86emu_t *emu, void* list, void* f)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_list_sort(list, findGCompareFuncFct(f));
|
||||
}
|
||||
|
||||
EXPORT void* my_g_list_sort_with_data(x86emu_t *emu, void* list, void* f, void* data)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_list_sort_with_data(list, findGCompareDataFuncFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void* my_g_queue_find_custom(x86emu_t *emu, void* queue, void* data, void* f)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_queue_find_custom(queue, data, findGCompareFuncFct(f));
|
||||
}
|
||||
|
||||
EXPORT void* my_g_list_find_custom(x86emu_t *emu, void* list, void* data, void* f)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_list_find_custom(list, data, findGCompareFuncFct(f));
|
||||
}
|
||||
|
||||
EXPORT uint32_t my_g_timeout_add_full(x86emu_t *emu, int priority, uint32_t interval, void* f, void* data, void* notify)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_timeout_add_full(priority, interval, findGSourceFuncFct(f), data, findDestroyFct(notify));
|
||||
}
|
||||
|
||||
EXPORT uint32_t my_g_timeout_add_seconds(x86emu_t *emu, uint32_t interval, void* f, void* data)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_timeout_add_seconds(interval, findGSourceFuncFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT uint32_t my_g_timeout_add_seconds_full(x86emu_t *emu, int priority, uint32_t interval, void* f, void* data, void* notify)
|
||||
{
|
||||
glib2_my_t *my = (glib2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_timeout_add_seconds_full(priority, interval, findGSourceFuncFct(f), data, findDestroyFct(notify));
|
||||
}
|
||||
|
||||
|
||||
#define CUSTOM_INIT \
|
||||
libname = lib->name;\
|
||||
my_lib = lib; \
|
||||
|
||||
+183
-176
@@ -145,7 +145,7 @@ GO(g_bit_storage, iFi)
|
||||
//GO(g_bookmark_file_to_file,
|
||||
GOM(g_build_filename, pFEpV)
|
||||
GO(g_build_filenamev, pFp)
|
||||
//GOM(g_build_path, pFEppV) // wrap using g_build_pathv
|
||||
GOM(g_build_path, pFEppV) // wrap using g_build_pathv
|
||||
GO(g_build_pathv, pFpp)
|
||||
GO(g_byte_array_append, pFppu)
|
||||
GO(g_byte_array_free, pFpi)
|
||||
@@ -344,7 +344,7 @@ GO(g_direct_equal, iFpp)
|
||||
GO(g_direct_hash, uFp)
|
||||
GO(g_dir_make_tmp, pFpp)
|
||||
GO(g_dir_open, pFp)
|
||||
//GO(g_dir_read_name,
|
||||
GO(g_dir_read_name, pFp)
|
||||
GO(g_dir_rewind, vFp)
|
||||
GO(g_dngettext, pFpppL)
|
||||
GO(g_double_equal, iFpp)
|
||||
@@ -484,44 +484,44 @@ GO(g_int_equal, iFpp)
|
||||
GO(g_intern_static_string, pFp)
|
||||
GO(g_intern_string, pFp)
|
||||
GO(g_int_hash, uFp)
|
||||
//GO(g_io_add_watch,
|
||||
//GO(g_io_add_watch_full,
|
||||
//GO(g_io_channel_close,
|
||||
//GO(g_io_channel_error_from_errno,
|
||||
//GO(g_io_channel_error_quark,
|
||||
//GO(g_io_channel_flush,
|
||||
//GO(g_io_channel_get_buffer_condition,
|
||||
//GO(g_io_channel_get_buffered,
|
||||
//GO(g_io_channel_get_buffer_size,
|
||||
//GO(g_io_channel_get_close_on_unref,
|
||||
//GO(g_io_channel_get_encoding,
|
||||
//GO(g_io_channel_get_flags,
|
||||
//GO(g_io_channel_get_line_term,
|
||||
//GO(g_io_channel_init,
|
||||
//GO(g_io_channel_new_file,
|
||||
//GO(g_io_channel_read,
|
||||
//GO(g_io_channel_read_chars,
|
||||
//GO(g_io_channel_read_line,
|
||||
//GO(g_io_channel_read_line_string,
|
||||
//GO(g_io_channel_read_to_end,
|
||||
//GO(g_io_channel_read_unichar,
|
||||
//GO(g_io_channel_ref,
|
||||
//GO(g_io_channel_seek,
|
||||
//GO(g_io_channel_seek_position,
|
||||
//GO(g_io_channel_set_buffered,
|
||||
//GO(g_io_channel_set_buffer_size,
|
||||
//GO(g_io_channel_set_close_on_unref,
|
||||
//GO(g_io_channel_set_encoding,
|
||||
//GO(g_io_channel_set_flags,
|
||||
//GO(g_io_channel_set_line_term,
|
||||
//GO(g_io_channel_shutdown,
|
||||
//GO(g_io_channel_unix_get_fd,
|
||||
//GO(g_io_channel_unix_new,
|
||||
//GO(g_io_channel_unref,
|
||||
//GO(g_io_channel_write,
|
||||
//GO(g_io_channel_write_chars,
|
||||
//GO(g_io_channel_write_unichar,
|
||||
//GO(g_io_create_watch,
|
||||
GOM(g_io_add_watch, uFEpipp)
|
||||
GOM(g_io_add_watch_full, uFEpiippp)
|
||||
GO(g_io_channel_close, vFp)
|
||||
GO(g_io_channel_error_from_errno, iFi)
|
||||
GO(g_io_channel_error_quark, pFv)
|
||||
GO(g_io_channel_flush, iFpp)
|
||||
GO(g_io_channel_get_buffer_condition, iFp)
|
||||
GO(g_io_channel_get_buffered, iFp)
|
||||
GO(g_io_channel_get_buffer_size, iFp)
|
||||
GO(g_io_channel_get_close_on_unref, iFp)
|
||||
GO(g_io_channel_get_encoding, pFp)
|
||||
GO(g_io_channel_get_flags, iFp)
|
||||
GO(g_io_channel_get_line_term, pFpp)
|
||||
GO(g_io_channel_init, vFp)
|
||||
GO(g_io_channel_new_file, pFppp)
|
||||
GO(g_io_channel_read, iFppLp)
|
||||
GO(g_io_channel_read_chars, iFpplpp)
|
||||
GO(g_io_channel_read_line, iFppppp)
|
||||
GO(g_io_channel_read_line_string, iFpppp)
|
||||
GO(g_io_channel_read_to_end, iFpppp)
|
||||
GO(g_io_channel_read_unichar, iFppp)
|
||||
GO(g_io_channel_ref, pFp)
|
||||
GO(g_io_channel_seek, iFpIi)
|
||||
GO(g_io_channel_seek_position, iFpIip)
|
||||
GO(g_io_channel_set_buffered, vFpi)
|
||||
GO(g_io_channel_set_buffer_size, vFpL)
|
||||
GO(g_io_channel_set_close_on_unref, vFpi)
|
||||
GO(g_io_channel_set_encoding, iFppp)
|
||||
GO(g_io_channel_set_flags, iFpip)
|
||||
GO(g_io_channel_set_line_term, vFppi)
|
||||
GO(g_io_channel_shutdown, iFpip)
|
||||
GO(g_io_channel_unix_get_fd, iFp)
|
||||
GO(g_io_channel_unix_new, pFi)
|
||||
GO(g_io_channel_unref, vFp)
|
||||
GO(g_io_channel_write, iFppLp)
|
||||
GO(g_io_channel_write_chars, iFpplpp)
|
||||
GO(g_io_channel_write_unichar, iFpup)
|
||||
GO(g_io_create_watch, pFpp)
|
||||
GO(g_key_file_error_quark, pFv)
|
||||
GO(g_key_file_free, vFp)
|
||||
GO(g_key_file_get_boolean, iFpppp)
|
||||
@@ -582,7 +582,7 @@ GO(g_list_copy, pFp)
|
||||
GO(g_list_delete_link, pFpp)
|
||||
GO(g_listenv, pFv)
|
||||
GO(g_list_find, pFpp)
|
||||
//GOM(g_list_find_custom, pFEppB)
|
||||
GOM(g_list_find_custom, pFEppp)
|
||||
GO(g_list_first, pFp)
|
||||
//GOM(g_list_foreach, vFEpBp)
|
||||
GO(g_list_free, vFp)
|
||||
@@ -606,8 +606,8 @@ GO(g_list_remove, pFpp)
|
||||
GO(g_list_remove_all, pFpp)
|
||||
GO(g_list_remove_link, pFpp)
|
||||
GO(g_list_reverse, pFp)
|
||||
//GOM(g_list_sort, pFEpB)
|
||||
//GOM(g_list_sort_with_data, pFEpBp)
|
||||
GOM(g_list_sort, pFEpp)
|
||||
GOM(g_list_sort_with_data, pFEppp)
|
||||
GO(g_locale_from_utf8, pFplppp)
|
||||
GO(g_locale_to_utf8, pFplppp)
|
||||
GO2(g_log, vFpppV, g_logv)
|
||||
@@ -685,21 +685,21 @@ GO(g_markup_escape_text, pFpl)
|
||||
//GO(g_markup_parse_context_unref,
|
||||
GOM(g_markup_printf_escaped, pFEpV)
|
||||
GOM(g_markup_vprintf_escaped, pFEpp)
|
||||
//GO(g_match_info_expand_references,
|
||||
//GO(g_match_info_fetch,
|
||||
//GO(g_match_info_fetch_all,
|
||||
//GO(g_match_info_fetch_named,
|
||||
//GO(g_match_info_fetch_named_pos,
|
||||
//GO(g_match_info_fetch_pos,
|
||||
//GO(g_match_info_free,
|
||||
//GO(g_match_info_get_match_count,
|
||||
//GO(g_match_info_get_regex,
|
||||
//GO(g_match_info_get_string,
|
||||
//GO(g_match_info_is_partial_match,
|
||||
//GO(g_match_info_matches,
|
||||
//GO(g_match_info_next,
|
||||
//GO(g_match_info_ref,
|
||||
//GO(g_match_info_unref,
|
||||
GO(g_match_info_expand_references, pFppp)
|
||||
GO(g_match_info_fetch, pFpi)
|
||||
GO(g_match_info_fetch_all, pFp)
|
||||
GO(g_match_info_fetch_named, pFpp)
|
||||
GO(g_match_info_fetch_named_pos, iFpppp)
|
||||
GO(g_match_info_fetch_pos, iFpipp)
|
||||
GO(g_match_info_free, vFp)
|
||||
GO(g_match_info_get_match_count, iFp)
|
||||
GO(g_match_info_get_regex, pFp)
|
||||
GO(g_match_info_get_string, pFp)
|
||||
GO(g_match_info_is_partial_match, iFp)
|
||||
GO(g_match_info_matches, iFp)
|
||||
GO(g_match_info_next, iFpp)
|
||||
GO(g_match_info_ref, pFp)
|
||||
GO(g_match_info_unref, vFp)
|
||||
//GO(g_mem_chunk_alloc,
|
||||
//GO(g_mem_chunk_alloc0,
|
||||
//GO(g_mem_chunk_clean,
|
||||
@@ -762,33 +762,37 @@ GO(g_once_init_leave, vFpL)
|
||||
GO(g_on_error_query, vFp)
|
||||
GO(g_on_error_stack_trace, vFp)
|
||||
GO(g_open, iFpii)
|
||||
//GO(g_option_context_add_group,
|
||||
//GO(g_option_context_add_main_entries,
|
||||
//GO(g_option_context_free,
|
||||
//GO(g_option_context_get_description,
|
||||
//GO(g_option_context_get_help,
|
||||
//GO(g_option_context_get_help_enabled,
|
||||
//GO(g_option_context_get_ignore_unknown_options,
|
||||
//GO(g_option_context_get_main_group,
|
||||
//GO(g_option_context_get_summary,
|
||||
//GO(g_option_context_new,
|
||||
//GO(g_option_context_parse,
|
||||
//GO(g_option_context_parse_strv,
|
||||
//GO(g_option_context_set_description,
|
||||
//GO(g_option_context_set_help_enabled,
|
||||
//GO(g_option_context_set_ignore_unknown_options,
|
||||
//GO(g_option_context_set_main_group,
|
||||
//GO(g_option_context_set_summary,
|
||||
//GO(g_option_context_set_translate_func,
|
||||
//GO(g_option_context_set_translation_domain,
|
||||
GO(g_option_context_add_group, vFpp)
|
||||
GO(g_option_context_add_main_entries, vFppp)
|
||||
GO(g_option_context_free, vFp)
|
||||
GO(g_option_context_get_description, pFp)
|
||||
GO(g_option_context_get_help, pFpip)
|
||||
GO(g_option_context_get_help_enabled, iFp)
|
||||
GO(g_option_context_get_ignore_unknown_options, iFp)
|
||||
GO(g_option_context_get_main_group, pFp)
|
||||
GO(g_option_context_get_strict_posix, iFp) // 2.44+
|
||||
GO(g_option_context_get_summary, pFp)
|
||||
GO(g_option_context_new, pFp)
|
||||
GO(g_option_context_parse, iFpppp)
|
||||
GO(g_option_context_parse_strv, iFppp)
|
||||
GO(g_option_context_set_description, vFpp)
|
||||
GO(g_option_context_set_help_enabled, vFpi)
|
||||
GO(g_option_context_set_ignore_unknown_options, vFpi)
|
||||
GO(g_option_context_set_main_group, vFpp)
|
||||
GO(g_option_context_set_strict_posix, vFpi) // 2.44+
|
||||
GO(g_option_context_set_summary, vFpp)
|
||||
//GOM(g_option_context_set_translate_func, vFEpBpB)
|
||||
GO(g_option_context_set_translation_domain, vFpp)
|
||||
//GO(g_option_error_quark,
|
||||
//GO(g_option_group_add_entries,
|
||||
//GO(g_option_group_free,
|
||||
//GO(g_option_group_new,
|
||||
//GO(g_option_group_set_error_hook,
|
||||
//GO(g_option_group_set_parse_hooks,
|
||||
//GO(g_option_group_set_translate_func,
|
||||
//GO(g_option_group_set_translation_domain,
|
||||
GO(g_option_group_add_entries, vFpp)
|
||||
GO(g_option_group_free, vFp)
|
||||
//GOM(g_option_group_new, pFEppppB)
|
||||
GO(g_option_group_ref, pFp) // 2.44+
|
||||
//GOM(g_option_group_set_error_hook, vFEpB)
|
||||
//GOM(g_option_group_set_parse_hooks, vFEpBB)
|
||||
//GOM(g_option_group_set_translate_func, vFEpBpB)
|
||||
GO(g_option_group_set_translation_domain, vFpp)
|
||||
GO(g_option_group_unref, vFp) // 2.44+
|
||||
GO(g_parse_debug_string, uFppi)
|
||||
GO(g_path_get_basename, pFp)
|
||||
GO(g_path_get_dirname, pFp)
|
||||
@@ -839,62 +843,65 @@ GO(g_quark_from_static_string, uFp)
|
||||
GO(g_quark_from_string, uFp)
|
||||
GO(g_quark_to_string, pFu)
|
||||
GO(g_quark_try_string, uFp)
|
||||
//GO(g_queue_clear,
|
||||
//GO(g_queue_copy,
|
||||
//GO(g_queue_delete_link,
|
||||
//GO(g_queue_find,
|
||||
//GO(g_queue_find_custom,
|
||||
//GO(g_queue_foreach,
|
||||
//GO(g_queue_free,
|
||||
//GO(g_queue_free_full,
|
||||
//GO(g_queue_get_length,
|
||||
//GO(g_queue_index,
|
||||
//GO(g_queue_init,
|
||||
//GO(g_queue_insert_after,
|
||||
//GO(g_queue_insert_before,
|
||||
//GO(g_queue_insert_sorted,
|
||||
//GO(g_queue_is_empty,
|
||||
//GO(g_queue_link_index,
|
||||
//GO(g_queue_new,
|
||||
//GO(g_queue_peek_head,
|
||||
//GO(g_queue_peek_head_link,
|
||||
//GO(g_queue_peek_nth,
|
||||
//GO(g_queue_peek_nth_link,
|
||||
//GO(g_queue_peek_tail,
|
||||
//GO(g_queue_peek_tail_link,
|
||||
//GO(g_queue_pop_head,
|
||||
//GO(g_queue_pop_head_link,
|
||||
//GO(g_queue_pop_nth,
|
||||
//GO(g_queue_pop_nth_link,
|
||||
//GO(g_queue_pop_tail,
|
||||
//GO(g_queue_pop_tail_link,
|
||||
//GO(g_queue_push_head,
|
||||
//GO(g_queue_push_head_link,
|
||||
//GO(g_queue_push_nth,
|
||||
//GO(g_queue_push_nth_link,
|
||||
//GO(g_queue_push_tail,
|
||||
//GO(g_queue_push_tail_link,
|
||||
//GO(g_queue_remove,
|
||||
//GO(g_queue_remove_all,
|
||||
//GO(g_queue_reverse,
|
||||
//GO(g_queue_sort,
|
||||
//GO(g_queue_unlink,
|
||||
//GO(g_rand_copy,
|
||||
//GO(g_rand_double,
|
||||
//GO(g_rand_double_range,
|
||||
//GO(g_rand_free,
|
||||
//GO(g_rand_int,
|
||||
//GO(g_rand_int_range,
|
||||
//GO(g_rand_new,
|
||||
//GO(g_rand_new_with_seed,
|
||||
//GO(g_rand_new_with_seed_array,
|
||||
//GO(g_random_double,
|
||||
//GO(g_random_double_range,
|
||||
//GO(g_random_int,
|
||||
//GO(g_random_int_range,
|
||||
//GO(g_random_set_seed,
|
||||
//GO(g_rand_set_seed,
|
||||
//GO(g_rand_set_seed_array,
|
||||
GO(g_queue_clear, vFp)
|
||||
//GOM(g_queue_clear_full, vFEpB) // 2.60+
|
||||
GO(g_queue_copy, pFp)
|
||||
GO(g_queue_delete_link, vFpp)
|
||||
GO(g_queue_find, pFpp)
|
||||
GOM(g_queue_find_custom, pFEppp)
|
||||
//GOM(g_queue_foreach, vFEpBp)
|
||||
GO(g_queue_free, vFp)
|
||||
//GOM(g_queue_free_full, vFEpB)
|
||||
GO(g_queue_get_length, uFp)
|
||||
GO(g_queue_index, iFpp)
|
||||
GO(g_queue_init, vFp)
|
||||
GO(g_queue_insert_after, vFppp)
|
||||
GO(g_queue_insert_after_link, vFppp) // 2.62+
|
||||
GO(g_queue_insert_before, vFppp)
|
||||
GO(g_queue_insert_before_link, vFppp) // 2.62+
|
||||
//GOM(g_queue_insert_sorted, vFEppBp)
|
||||
GO(g_queue_is_empty, iFp)
|
||||
GO(g_queue_link_index, iFpp)
|
||||
GO(g_queue_new, pFv)
|
||||
GO(g_queue_peek_head, pFp)
|
||||
GO(g_queue_peek_head_link, pFp)
|
||||
GO(g_queue_peek_nth, pFpu)
|
||||
GO(g_queue_peek_nth_link, pFpu)
|
||||
GO(g_queue_peek_tail, pFp)
|
||||
GO(g_queue_peek_tail_link, pFp)
|
||||
GO(g_queue_pop_head, pFp)
|
||||
GO(g_queue_pop_head_link, pFp)
|
||||
GO(g_queue_pop_nth, pFpu)
|
||||
GO(g_queue_pop_nth_link, pFpu)
|
||||
GO(g_queue_pop_tail, pFp)
|
||||
GO(g_queue_pop_tail_link, pFp)
|
||||
GO(g_queue_push_head, vFpp)
|
||||
GO(g_queue_push_head_link, vFpp)
|
||||
GO(g_queue_push_nth, vFppi)
|
||||
GO(g_queue_push_nth_link, vFpip)
|
||||
GO(g_queue_push_tail, vFpp)
|
||||
GO(g_queue_push_tail_link, vFpp)
|
||||
GO(g_queue_remove, iFpp)
|
||||
GO(g_queue_remove_all, iFpp)
|
||||
GO(g_queue_reverse, pFp)
|
||||
//GOM(g_queue_sort, vFEpBp)
|
||||
GO(g_queue_unlink, vFpp)
|
||||
GO(g_rand_copy, pFp)
|
||||
GO(g_rand_double, dFv)
|
||||
GO(g_rand_double_range, dFdd)
|
||||
GO(g_rand_free, vFp)
|
||||
GO(g_rand_int, uFp)
|
||||
GO(g_rand_int_range, uFpuu)
|
||||
GO(g_rand_new, pFv)
|
||||
GO(g_rand_new_with_seed, pFu)
|
||||
GO(g_rand_new_with_seed_array, pFpu)
|
||||
GO(g_random_double, dFp)
|
||||
GO(g_random_double_range, dFpdd)
|
||||
GO(g_random_int, iFii)
|
||||
GO(g_random_int_range, iFii)
|
||||
GO(g_random_set_seed, vFu)
|
||||
GO(g_rand_set_seed, vFpu)
|
||||
GO(g_rand_set_seed_array, vFppu)
|
||||
GO(g_realloc, pFpL)
|
||||
GO(g_realloc_n, pFpLL)
|
||||
//GO(g_rec_mutex_clear,
|
||||
@@ -902,32 +909,32 @@ GO(g_realloc_n, pFpLL)
|
||||
//GO(g_rec_mutex_lock,
|
||||
//GO(g_rec_mutex_trylock,
|
||||
//GO(g_rec_mutex_unlock,
|
||||
//GO(g_regex_check_replacement,
|
||||
GO(g_regex_check_replacement, iFppp)
|
||||
//GO(g_regex_error_quark,
|
||||
//GO(g_regex_escape_nul,
|
||||
//GO(g_regex_escape_string,
|
||||
//GO(g_regex_get_capture_count,
|
||||
//GO(g_regex_get_compile_flags,
|
||||
//GO(g_regex_get_has_cr_or_lf,
|
||||
//GO(g_regex_get_match_flags,
|
||||
//GO(g_regex_get_max_backref,
|
||||
//GO(g_regex_get_max_lookbehind,
|
||||
//GO(g_regex_get_pattern,
|
||||
//GO(g_regex_get_string_number,
|
||||
//GO(g_regex_match,
|
||||
//GO(g_regex_match_all,
|
||||
//GO(g_regex_match_all_full,
|
||||
//GO(g_regex_match_full,
|
||||
//GO(g_regex_match_simple,
|
||||
//GO(g_regex_new,
|
||||
//GO(g_regex_ref,
|
||||
//GO(g_regex_replace,
|
||||
//GO(g_regex_replace_eval,
|
||||
//GO(g_regex_replace_literal,
|
||||
//GO(g_regex_split,
|
||||
//GO(g_regex_split_full,
|
||||
//GO(g_regex_split_simple,
|
||||
//GO(g_regex_unref,
|
||||
GO(g_regex_escape_nul, pFpi)
|
||||
GO(g_regex_escape_string, pFpi)
|
||||
GO(g_regex_get_capture_count, iFp)
|
||||
GO(g_regex_get_compile_flags, iFp)
|
||||
GO(g_regex_get_has_cr_or_lf, iFp)
|
||||
GO(g_regex_get_match_flags, iFp)
|
||||
GO(g_regex_get_max_backref, iFp)
|
||||
GO(g_regex_get_max_lookbehind, iFp)
|
||||
GO(g_regex_get_pattern, pFp)
|
||||
GO(g_regex_get_string_number, iFpp)
|
||||
GO(g_regex_match, iFppip)
|
||||
GO(g_regex_match_all, iFppip)
|
||||
GO(g_regex_match_all_full, iFppLiipp)
|
||||
GO(g_regex_match_full, iFppLiipp)
|
||||
GO(g_regex_match_simple, iFppii)
|
||||
GO(g_regex_new, pFpiip)
|
||||
GO(g_regex_ref, pFp)
|
||||
GO(g_regex_replace, pFppLipip)
|
||||
//GOM(g_regex_replace_eval, pFEppLiiBpp)
|
||||
GO(g_regex_replace_literal, pFppLipip)
|
||||
GO(g_regex_split, pFppi)
|
||||
GO(g_regex_split_full, pFppLiiip)
|
||||
GO(g_regex_split_simple, pFppii)
|
||||
GO(g_regex_unref, vFp)
|
||||
//GO(g_relation_count,
|
||||
//GO(g_relation_delete,
|
||||
//GO(g_relation_destroy,
|
||||
@@ -1013,8 +1020,8 @@ GO(g_setenv, iFppi)
|
||||
GO(g_set_error, vFppipppppppppp) // vaarg, and no valist equivalent it seems. Should wrap with literal version probably
|
||||
GO(g_set_error_literal, vFppip)
|
||||
GO(g_set_prgname, vFp)
|
||||
//GOM(g_set_printerr_handler, BFEB)
|
||||
//GOM(g_set_print_handler, BFEB)
|
||||
GOM(g_set_printerr_handler, pFEp)
|
||||
GOM(g_set_print_handler, pFEp)
|
||||
//GO(g_shell_error_quark,
|
||||
GO(g_shell_parse_argv, iFpppp)
|
||||
GO(g_shell_quote, pFp)
|
||||
@@ -1056,8 +1063,8 @@ GO(g_slist_remove, pFpp)
|
||||
GO(g_slist_remove_all, pFpp)
|
||||
GO(g_slist_remove_link, pFpp)
|
||||
GO(g_slist_reverse, pFp)
|
||||
//GOM(g_slist_sort, pFEpp)
|
||||
//GOM(g_slist_sort_with_data, pFEppp)
|
||||
GOM(g_slist_sort, pFEpp)
|
||||
GOM(g_slist_sort_with_data, pFEppp)
|
||||
GO2(g_snprintf, iFEpLpV, my_g_vsnprintf)
|
||||
GO(g_source_add_child_source, vFpp)
|
||||
GO(g_source_add_poll, vFpp)
|
||||
@@ -1288,9 +1295,9 @@ GO(g_thread_set_priority, vFpi)
|
||||
GO(g_thread_unref, vFp)
|
||||
GO(g_thread_yield, vFv)
|
||||
GOM(g_timeout_add, uFEupp)
|
||||
//GOM(g_timeout_add_full, uFEiuBpB)
|
||||
//GOM(g_timeout_add_seconds, uFEuBp)
|
||||
//GOM(g_timeout_add_seconds_full, uFEiuBpB)
|
||||
GOM(g_timeout_add_full, uFEiuppp)
|
||||
GOM(g_timeout_add_seconds, uFEupp)
|
||||
GOM(g_timeout_add_seconds_full, uFEiuppp)
|
||||
GO(g_timeout_source_new, pFu)
|
||||
GO(g_timeout_source_new_seconds, pFu)
|
||||
//GO(g_timer_continue,
|
||||
@@ -1313,10 +1320,10 @@ GO(g_time_val_to_iso8601, pFp)
|
||||
//GO(g_time_zone_new_utc,
|
||||
//GO(g_time_zone_ref,
|
||||
//GO(g_time_zone_unref,
|
||||
//GO(g_trash_stack_height,
|
||||
//GO(g_trash_stack_peek,
|
||||
//GO(g_trash_stack_pop,
|
||||
//GO(g_trash_stack_push,
|
||||
GO(g_trash_stack_height, uFp)
|
||||
GO(g_trash_stack_peek, pFp)
|
||||
GO(g_trash_stack_pop, pFp)
|
||||
GO(g_trash_stack_push, vFpp)
|
||||
//GO(g_tree_destroy,
|
||||
//GO(g_tree_foreach,
|
||||
//GO(g_tree_height,
|
||||
|
||||
+205
-89
@@ -17,14 +17,25 @@
|
||||
#include "box86context.h"
|
||||
#include "emu/x86emu_private.h"
|
||||
#include "gtkclass.h"
|
||||
#include "libtools/vkalign.h" // TODO: move those utilities function to something not Vk tagged
|
||||
|
||||
const char* gobject2Name = "libgobject-2.0.so.0";
|
||||
#define LIBNAME gobject2
|
||||
library_t *my_lib = NULL;
|
||||
|
||||
typedef int (*iFv_t)(void);
|
||||
typedef void* (*pFi_t)(int);
|
||||
typedef int (*iFp_t)(void*);
|
||||
typedef void* (*pFp_t)(void*);
|
||||
typedef int8_t(*cFp_t)(void*);
|
||||
typedef uint8_t(*CFp_t)(void*);
|
||||
typedef int (*iFpp_t)(void*, void*);
|
||||
typedef void* (*pFip_t)(int, void*);
|
||||
typedef void* (*pFpi_t)(void*, int);
|
||||
typedef void (*vFpi_t)(void*, int);
|
||||
typedef void (*vFpp_t)(void*, void*);
|
||||
typedef void (*vFpc_t)(void*, int8_t);
|
||||
typedef void (*vFpC_t)(void*, uint8_t);
|
||||
typedef void (*vFiip_t)(int, int, void*);
|
||||
typedef int (*iFppp_t)(void*, void*, void*);
|
||||
typedef void* (*pFppp_t)(void*, void*, void*);
|
||||
@@ -67,8 +78,11 @@ typedef uint32_t (*uFpiiupppiuppp_t)(void*, int, int, uint32_t, void*, void*, vo
|
||||
GO(g_param_spec_set_qdata_full, vFpupp_t) \
|
||||
GO(g_param_type_register_static, iFpp_t) \
|
||||
GO(g_value_array_sort_with_data, pFppp_t) \
|
||||
GO(g_object_set_data_full, vFpppp_t)
|
||||
|
||||
GO(g_object_set_data_full, vFpppp_t) \
|
||||
GO(g_type_class_peek_parent, pFp_t) \
|
||||
GO(g_value_init, pFpi_t) \
|
||||
GO(g_value_reset, pFp_t) \
|
||||
GO(g_param_spec_get_default_value, pFp_t) \
|
||||
|
||||
typedef struct gobject2_my_s {
|
||||
// functions
|
||||
@@ -77,12 +91,15 @@ typedef struct gobject2_my_s {
|
||||
#undef GO
|
||||
} gobject2_my_t;
|
||||
|
||||
static void addGObject2Alternate(library_t* lib);
|
||||
|
||||
void* getGobject2My(library_t* lib)
|
||||
{
|
||||
gobject2_my_t* my = (gobject2_my_t*)calloc(1, sizeof(gobject2_my_t));
|
||||
#define GO(A, W) my->A = (W)dlsym(lib->priv.w.lib, #A);
|
||||
SUPER()
|
||||
#undef GO
|
||||
addGObject2Alternate(lib);
|
||||
return my;
|
||||
}
|
||||
#undef SUPER
|
||||
@@ -98,27 +115,23 @@ static int signal_cb(void* a, void* b, void* c, void* d)
|
||||
// hopefully, no callback have more than 4 arguments...
|
||||
my_signal_t* sig = NULL;
|
||||
int i = 0;
|
||||
if((uintptr_t)a>0x10000)
|
||||
if(((my_signal_t*)a)->sign == SIGN) {
|
||||
sig = (my_signal_t*)a;
|
||||
i = 1;
|
||||
}
|
||||
if(!sig && (uintptr_t)b>0x10000)
|
||||
if(((my_signal_t*)b)->sign == SIGN) {
|
||||
sig = (my_signal_t*)b;
|
||||
i = 2;
|
||||
}
|
||||
if(!sig && (uintptr_t)c>0x10000)
|
||||
if(((my_signal_t*)c)->sign == SIGN) {
|
||||
sig = (my_signal_t*)c;
|
||||
i = 3;
|
||||
}
|
||||
if(!sig && (uintptr_t)d>0x10000)
|
||||
if(((my_signal_t*)d)->sign == SIGN) {
|
||||
sig = (my_signal_t*)d;
|
||||
i = 4;
|
||||
}
|
||||
printf_log(LOG_DEBUG, "gobject2 Signal called, sig=%p, NArgs=%d\n", sig, i);
|
||||
if(my_signal_is_valid(a)) {
|
||||
sig = (my_signal_t*)a;
|
||||
i = 1;
|
||||
}
|
||||
if(!sig && my_signal_is_valid(b)) {
|
||||
sig = (my_signal_t*)b;
|
||||
i = 2;
|
||||
}
|
||||
if(!sig && my_signal_is_valid(c)) {
|
||||
sig = (my_signal_t*)c;
|
||||
i = 3;
|
||||
}
|
||||
if(!sig && my_signal_is_valid(d)) {
|
||||
sig = (my_signal_t*)d;
|
||||
i = 4;
|
||||
}
|
||||
printf_log(LOG_DEBUG, "gobject2 Signal called, sig=%p, handler=%p, NArgs=%d\n", sig, (void*)sig->c_handler, i);
|
||||
switch(i) {
|
||||
case 1: return (int)RunFunction(my_context, sig->c_handler, 1, sig->data);
|
||||
case 2: return (int)RunFunction(my_context, sig->c_handler, 2, a, sig->data);
|
||||
@@ -136,7 +149,6 @@ static int signal_cb_swapped(my_signal_t* sig, void* b, void* c, void* d)
|
||||
}
|
||||
static int signal_cb_5(void* a, void* b, void* c, void* d, my_signal_t* sig)
|
||||
{
|
||||
// data is in front here...
|
||||
printf_log(LOG_DEBUG, "gobject2 5 Signal called, sig=%p\n", sig);
|
||||
return (int)RunFunction(my_context, sig->c_handler, 5, a, b, c, d, sig->data);
|
||||
}
|
||||
@@ -148,7 +160,6 @@ static int signal_cb_swapped_5(my_signal_t* sig, void* b, void* c, void* d, void
|
||||
}
|
||||
static int signal_cb_6(void* a, void* b, void* c, void* d, void* e, my_signal_t* sig)
|
||||
{
|
||||
// data is in front here...
|
||||
printf_log(LOG_DEBUG, "gobject2 6 Signal called, sig=%p\n", sig);
|
||||
return (int)RunFunction(my_context, sig->c_handler, 6, a, b, c, d, e, sig->data);
|
||||
}
|
||||
@@ -160,7 +171,6 @@ static int signal_cb_swapped_6(my_signal_t* sig, void* b, void* c, void* d, void
|
||||
}
|
||||
static int signal_cb_8(void* a, void* b, void* c, void* d, void* e, void* f, void* g, my_signal_t* sig)
|
||||
{
|
||||
// data is in front here...
|
||||
printf_log(LOG_DEBUG, "gobject2 8 Signal called, sig=%p\n", sig);
|
||||
return (int)RunFunction(my_context, sig->c_handler, 8, a, b, c, d, e, f, g, sig->data);
|
||||
}
|
||||
@@ -170,6 +180,7 @@ static int signal_cb_swapped_8(my_signal_t* sig, void* b, void* c, void* d, void
|
||||
printf_log(LOG_DEBUG, "gobject2 swaped8 Signal called, sig=%p\n", sig);
|
||||
return (int)RunFunction(my_context, sig->c_handler, 8, sig->data, b, c, d, e, f, g, h);
|
||||
}
|
||||
|
||||
static void signal_delete(my_signal_t* sig, void* b)
|
||||
{
|
||||
uintptr_t d = sig->destroy;
|
||||
@@ -179,38 +190,95 @@ static void signal_delete(my_signal_t* sig, void* b)
|
||||
printf_log(LOG_DEBUG, "gobject2 Signal deleted, sig=%p, destroy=%p\n", sig, (void*)d);
|
||||
free(sig);
|
||||
}
|
||||
|
||||
static void addGObject2Alternate(library_t* lib)
|
||||
{
|
||||
#define GO(A, W) AddAutomaticBridge(thread_get_emu(), lib->priv.w.bridge, W, dlsym(lib->priv.w.lib, #A), 0)
|
||||
GO(g_cclosure_marshal_VOID__VOID, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__BOOLEAN, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__UCHAR, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__INT, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__UINT, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__LONG, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__ULONG, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__ENUM, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__FLAGS, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__FLOAT, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__DOUBLE, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__STRING, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__PARAM, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__BOXED, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__POINTER, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__OBJECT, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__VARIANT, vFppuppp);
|
||||
GO(g_cclosure_marshal_STRING__OBJECT_POINTER, vFppuppp);
|
||||
GO(g_cclosure_marshal_VOID__UINT_POINTER, vFppuppp);
|
||||
GO(g_cclosure_marshal_BOOLEAN__FLAGS, vFppuppp);
|
||||
GO(g_cclosure_marshal_BOOLEAN__BOXED_BOXED, vFppuppp);
|
||||
GO(g_cclosure_marshal_generic_va, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__VOIDv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__BOOLEANv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__CHARv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__UCHARv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__INTv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__UINTv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__LONGv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__ULONGv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__ENUMv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__FLAGSv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__FLOATv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__DOUBLEv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__STRINGv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__PARAMv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__BOXEDv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__POINTERv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__OBJECTv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__VARIANTv, vFpppppip);
|
||||
GO(g_cclosure_marshal_STRING__OBJECT_POINTERv, vFpppppip);
|
||||
GO(g_cclosure_marshal_VOID__UINT_POINTERv, vFpppppip);
|
||||
GO(g_cclosure_marshal_BOOLEAN__FLAGSv, vFpppppip);
|
||||
GO(g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv, vFpppppip);
|
||||
#undef GO
|
||||
#define GO(A, W) AddAutomaticBridge(thread_get_emu(), lib->priv.w.bridge, W, A, 0)
|
||||
GO(signal_cb, iFpppp);
|
||||
GO(signal_cb_swapped, iFpppp);
|
||||
GO(signal_cb_5, iFppppp);
|
||||
GO(signal_cb_swapped_5, iFppppp);
|
||||
GO(signal_cb_6, iFpppppp);
|
||||
GO(signal_cb_swapped_6, iFpppppp);
|
||||
GO(signal_cb_8, iFpppppppp);
|
||||
GO(signal_cb_swapped_8, iFpppppppp);
|
||||
GO(signal_delete, vFpp);
|
||||
#undef GO
|
||||
}
|
||||
|
||||
EXPORT uintptr_t my_g_signal_connect_data(x86emu_t* emu, void* instance, void* detailed, void* c_handler, void* data, void* closure, uint32_t flags)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
//TODO: get the type of instance to be more precise below
|
||||
|
||||
my_signal_t *sig = new_mysignal(c_handler, data, closure);
|
||||
uintptr_t ret = 0;
|
||||
if(strcmp((const char*)detailed, "query-tooltip")==0) // GtkWidget
|
||||
ret = my->g_signal_connect_data(instance, detailed, (flags&2)?((void*)signal_cb_swapped_6):((void*)signal_cb_6), sig, signal_delete, flags);
|
||||
else if(strcmp((const char*)detailed, "selection-get")==0) // GtkWidget
|
||||
ret = my->g_signal_connect_data(instance, detailed, (flags&2)?((void*)signal_cb_swapped_5):((void*)signal_cb_5), sig, signal_delete, flags);
|
||||
else if(strcmp((const char*)detailed, "drag-data-get")==0) // GtkWidget
|
||||
ret = my->g_signal_connect_data(instance, detailed, (flags&2)?((void*)signal_cb_swapped_5):((void*)signal_cb_5), sig, signal_delete, flags);
|
||||
else if(strcmp((const char*)detailed, "drag-data-received")==0) // Gtkwidget
|
||||
ret = my->g_signal_connect_data(instance, detailed, (flags&2)?((void*)signal_cb_swapped_8):((void*)signal_cb_8), sig, signal_delete, flags);
|
||||
else if(strcmp((const char*)detailed, "drag-drop")==0) // Gtkwidget
|
||||
ret = my->g_signal_connect_data(instance, detailed, (flags&2)?((void*)signal_cb_swapped_6):((void*)signal_cb_6), sig, signal_delete, flags);
|
||||
else if(strcmp((const char*)detailed, "drag-motion")==0) // Gtkwidget
|
||||
ret = my->g_signal_connect_data(instance, detailed, (flags&2)?((void*)signal_cb_swapped_6):((void*)signal_cb_6), sig, signal_delete, flags);
|
||||
#define GO(A, B) if(strcmp((const char*)detailed, A)==0) ret = my->g_signal_connect_data(instance, detailed, (flags&2)?((void*)signal_cb_swapped_##B):((void*)signal_cb_##B), sig, signal_delete, flags);
|
||||
GO("query-tooltip", 6) // GtkWidget
|
||||
else GO("selection-get", 5) //GtkWidget
|
||||
else GO("drag-data-get", 5) //GtkWidget
|
||||
else GO("drag-data-received", 8) //GtkWidget
|
||||
else GO("drag-drop", 6) //GtkWidget
|
||||
else GO("drag-motion", 6) //GtkWidget
|
||||
else GO("expand-collapse-cursor-row", 5) //GtkTreeView
|
||||
else
|
||||
ret = my->g_signal_connect_data(instance, detailed, (flags&2)?((void*)signal_cb_swapped):((void*)signal_cb), sig, signal_delete, flags);
|
||||
|
||||
#undef GO
|
||||
printf_log(LOG_DEBUG, "Connecting gobject2 %p signal \"%s\" with sig=%p to %p, flags=%d\n", instance, (char*)detailed, sig, c_handler, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
EXPORT void* my_g_object_connect(x86emu_t* emu, void* object, void* signal_spec, void** b)
|
||||
{
|
||||
//library_t * lib = GetLibInternal(gobject2Name);
|
||||
//gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
//gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
char* spec = (char*)signal_spec;
|
||||
while(spec) {
|
||||
@@ -317,9 +385,11 @@ static void* findAccumulatorFct(void* fct)
|
||||
// GClosureMarshal
|
||||
#define GO(A) \
|
||||
static uintptr_t my_marshal_fct_##A = 0; \
|
||||
static int my_marshal_##A(void* closure, void* return_value, uint32_t n, void* values, void* hint, void* data) \
|
||||
{ \
|
||||
return RunFunction(my_context, my_marshal_fct_##A, 6, closure, return_value, n, values, hint, data);\
|
||||
static void my_marshal_##A(void* closure, void* return_value, uint32_t n, void* values, void* hint, void* data) \
|
||||
{ \
|
||||
void* newvalues = vkStructUnalign(values, "idd", n); \
|
||||
RunFunction(my_context, my_marshal_fct_##A, 6, closure, return_value, n, newvalues, hint, data); \
|
||||
free(newvalues); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
@@ -330,7 +400,7 @@ static void* findMarshalFct(void* fct)
|
||||
#define GO(A) if(my_marshal_fct_##A == (uintptr_t)fct) return my_marshal_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_marshal_fct_##A == 0) {my_marshal_fct_##A = (uintptr_t)fct; return my_marshal_##A; }
|
||||
#define GO(A) if(my_marshal_fct_##A == 0) {AddAutomaticBridge(thread_get_emu(), my_lib->priv.w.bridge, vFppuppp, my_marshal_##A, 0); my_marshal_fct_##A = (uintptr_t)fct; return my_marshal_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gobject Closure Marshal callback\n");
|
||||
@@ -479,8 +549,7 @@ static void* findGInterfaceFinalizeFuncFct(void* fct)
|
||||
|
||||
EXPORT int my_g_boxed_type_register_static(x86emu_t* emu, void* name, void* boxed_copy, void* boxed_free)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
void* bc = findCopyFct(boxed_copy);
|
||||
void* bf = findFreeFct(boxed_free);
|
||||
return my->g_boxed_type_register_static(name, bc, bf);
|
||||
@@ -488,8 +557,7 @@ EXPORT int my_g_boxed_type_register_static(x86emu_t* emu, void* name, void* boxe
|
||||
|
||||
EXPORT uint32_t my_g_signal_new(x86emu_t* emu, void* name, int itype, int flags, uint32_t offset, void* acc, void* accu_data, void* marsh, int rtype, uint32_t n, void** b)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
printf_log(LOG_DEBUG, "g_signal_new for \"%s\", with offset=%d and %d args\n", (const char*)name, offset, n);
|
||||
|
||||
@@ -508,8 +576,7 @@ EXPORT uint32_t my_g_signal_new(x86emu_t* emu, void* name, int itype, int flags,
|
||||
|
||||
EXPORT uint32_t my_g_signal_newv(x86emu_t* emu, void* name, int itype, int flags, void* closure, void* acc, void* accu_data, void* marsh, int rtype, uint32_t n, void* types)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
printf_log(LOG_DEBUG, "g_signal_newv for \"%s\", with %d args\n", (const char*)name, n);
|
||||
|
||||
@@ -518,8 +585,7 @@ EXPORT uint32_t my_g_signal_newv(x86emu_t* emu, void* name, int itype, int flags
|
||||
|
||||
EXPORT uint32_t my_g_signal_new_valist(x86emu_t* emu, void* name, int itype, int flags, void* closure, void* acc, void* accu_data, void* marsh, int rtype, uint32_t n, void* b)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
printf_log(LOG_DEBUG, "g_signal_new_valist for \"%s\", with %d args\n", (const char*)name, n);
|
||||
|
||||
@@ -528,8 +594,7 @@ EXPORT uint32_t my_g_signal_new_valist(x86emu_t* emu, void* name, int itype, int
|
||||
|
||||
EXPORT uint32_t my_g_signal_handlers_block_matched(x86emu_t* emu, void* instance, int mask, uint32_t signal, void* detail, void* closure, void* fnc, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
// NOTE that I have no idea of the fnc signature!...
|
||||
if (fnc) printf_log(LOG_INFO, "Warning, gobject g_signal_handlers_block_matched called with non null function \n");
|
||||
@@ -539,8 +604,7 @@ EXPORT uint32_t my_g_signal_handlers_block_matched(x86emu_t* emu, void* instance
|
||||
|
||||
EXPORT uint32_t my_g_signal_handlers_unblock_matched(x86emu_t* emu, void* instance, int mask, uint32_t signal, void* detail, void* closure, void* fnc, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
// NOTE that I have no idea of the fnc signature!...
|
||||
if (fnc) printf_log(LOG_INFO, "Warning, gobject g_signal_handlers_unblock_matched called with non null function \n");
|
||||
@@ -550,8 +614,7 @@ EXPORT uint32_t my_g_signal_handlers_unblock_matched(x86emu_t* emu, void* instan
|
||||
|
||||
EXPORT uint32_t my_g_signal_handlers_disconnect_matched(x86emu_t* emu, void* instance, int mask, uint32_t signal, void* detail, void* closure, void* fnc, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
// NOTE that I have no idea of the fnc signature!...
|
||||
if (fnc) printf_log(LOG_INFO, "Warning, gobject g_signal_handlers_disconnect_matched called with non null function \n");
|
||||
@@ -561,8 +624,7 @@ EXPORT uint32_t my_g_signal_handlers_disconnect_matched(x86emu_t* emu, void* ins
|
||||
|
||||
EXPORT unsigned long my_g_signal_handler_find(x86emu_t* emu, void* instance, int mask, uint32_t signal, void* detail, void* closure, void* fnc, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
// NOTE that I have no idea of the fnc signature!...
|
||||
if (fnc) printf_log(LOG_INFO, "Warning, gobject g_signal_handler_find called with non null function \n");
|
||||
@@ -572,8 +634,7 @@ EXPORT unsigned long my_g_signal_handler_find(x86emu_t* emu, void* instance, int
|
||||
|
||||
EXPORT void* my_g_object_new(x86emu_t* emu, int type, void* first, void* b)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
if(first)
|
||||
return my->g_object_new_valist(type, first, b);
|
||||
@@ -582,24 +643,21 @@ EXPORT void* my_g_object_new(x86emu_t* emu, int type, void* first, void* b)
|
||||
|
||||
EXPORT int my_g_type_register_static(x86emu_t* emu, int parent, void* name, my_GTypeInfo_t* info, int flags)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_type_register_static(parent, name, findFreeGTypeInfo(info, parent), flags);
|
||||
}
|
||||
|
||||
EXPORT int my_g_type_register_fundamental(x86emu_t* emu, int parent, void* name, my_GTypeInfo_t* info, void* finfo, int flags)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_type_register_fundamental(parent, name, findFreeGTypeInfo(info, parent), finfo, flags);
|
||||
}
|
||||
|
||||
EXPORT void my_g_value_register_transform_func(x86emu_t* emu, int src, int dst, void* f)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
my->g_value_register_transform_func(src, dst, findValueTransformFct(f));
|
||||
}
|
||||
@@ -612,8 +670,7 @@ static int my_signal_emission_hook(void* ihint, uint32_t n, void* values, my_sig
|
||||
EXPORT unsigned long my_g_signal_add_emission_hook(x86emu_t* emu, uint32_t signal, void* detail, void* f, void* data, void* notify)
|
||||
{
|
||||
// there can be many signals connected, so something "light" is needed here
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
if(!f)
|
||||
return my->g_signal_add_emission_hook(signal, detail, f, data, notify);
|
||||
@@ -624,8 +681,7 @@ EXPORT unsigned long my_g_signal_add_emission_hook(x86emu_t* emu, uint32_t signa
|
||||
|
||||
EXPORT int my_g_type_register_static_simple(x86emu_t* emu, int parent, void* name, uint32_t class_size, void* class_init, uint32_t instance_size, void* instance_init, int flags)
|
||||
{
|
||||
//library_t * lib = GetLibInternal(gobject2Name);
|
||||
//gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
//gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
my_GTypeInfo_t info = {0};
|
||||
info.class_size = class_size;
|
||||
@@ -644,8 +700,7 @@ typedef struct my_GInterfaceInfo_s {
|
||||
|
||||
EXPORT void my_g_type_add_interface_static(x86emu_t* emu, int instance_type, int interface_type, my_GInterfaceInfo_t* info)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
my_GInterfaceInfo_t i = {0};
|
||||
i.interface_init = findGInterfaceInitFuncFct(info->interface_init);
|
||||
@@ -656,16 +711,14 @@ EXPORT void my_g_type_add_interface_static(x86emu_t* emu, int instance_type, int
|
||||
|
||||
EXPORT void my_g_param_spec_set_qdata_full(x86emu_t* emu, void* pspec, uint32_t quark, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
my->g_param_spec_set_qdata_full(pspec, quark, data, findFreeFct(notify));
|
||||
}
|
||||
|
||||
EXPORT int my_g_param_type_register_static(x86emu_t* emu, void* name, void* pspec_info)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
return my->g_param_type_register_static(name, findFreeGParamSpecTypeInfo(pspec_info));
|
||||
}
|
||||
@@ -677,8 +730,7 @@ static int my_compare_fnc(void* a, void* b, x86emu_t* emu)
|
||||
}
|
||||
EXPORT void* my_g_value_array_sort(x86emu_t* emu, void* array, void* comp)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
x86emu_t* emucb = AddSharedCallback(emu, (uintptr_t)comp, 2, NULL, NULL, NULL, NULL);
|
||||
void* ret = my->g_value_array_sort_with_data(array, my_compare_fnc, emucb);
|
||||
@@ -688,8 +740,7 @@ EXPORT void* my_g_value_array_sort(x86emu_t* emu, void* array, void* comp)
|
||||
|
||||
EXPORT void* my_g_value_array_sort_with_data(x86emu_t* emu, void* array, void* comp, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
x86emu_t* emucb = AddSharedCallback(emu, (uintptr_t)comp, 3, NULL, NULL, data, NULL);
|
||||
void* ret = my->g_value_array_sort_with_data(array, my_compare_fnc, emucb);
|
||||
@@ -699,15 +750,79 @@ EXPORT void* my_g_value_array_sort_with_data(x86emu_t* emu, void* array, void* c
|
||||
|
||||
EXPORT void my_g_object_set_data_full(x86emu_t* emu, void* object, void* key, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(gobject2Name);
|
||||
gobject2_my_t *my = (gobject2_my_t*)lib->priv.w.p2;
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
my->g_object_set_data_full(object, key, data, findFreeFct(notify));
|
||||
}
|
||||
|
||||
EXPORT void* my_g_type_class_peek_parent(x86emu_t* emu, void* object)
|
||||
{
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
void* klass = my->g_type_class_peek_parent(object);
|
||||
int type = klass?*(int*)klass:0;
|
||||
return wrapCopyGTKClass(klass, type);
|
||||
}
|
||||
|
||||
typedef struct my_GValue_s
|
||||
{
|
||||
int g_type;
|
||||
union {
|
||||
int v_int;
|
||||
int64_t v_int64;
|
||||
uint64_t v_uint64;
|
||||
float v_float;
|
||||
double v_double;
|
||||
void* v_pointer;
|
||||
} data[2];
|
||||
} my_GValue_t;
|
||||
|
||||
static void alignGValue(my_GValue_t* v, void* value)
|
||||
{
|
||||
v->g_type = *(int*)value;
|
||||
memcpy(v->data, value+4, 2*sizeof(double));
|
||||
}
|
||||
static void unalignGValue(void* value, my_GValue_t* v)
|
||||
{
|
||||
*(int*)value = v->g_type;
|
||||
memcpy(value+4, v->data, 2*sizeof(double));
|
||||
}
|
||||
|
||||
EXPORT void* my_g_value_init(void* value, int type)
|
||||
{
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
my_GValue_t v;
|
||||
alignGValue(&v, value);
|
||||
my->g_value_init(&v, type);
|
||||
unalignGValue(value, &v);
|
||||
return value;
|
||||
}
|
||||
|
||||
EXPORT void* my_g_value_reset(void* value)
|
||||
{
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
my_GValue_t v;
|
||||
alignGValue(&v, value);
|
||||
my->g_value_reset(&v);
|
||||
unalignGValue(value, &v);
|
||||
return value;
|
||||
}
|
||||
|
||||
EXPORT void* my_g_param_spec_get_default_value(void* spec)
|
||||
{
|
||||
gobject2_my_t *my = (gobject2_my_t*)my_lib->priv.w.p2;
|
||||
my_GValue_t v = *(my_GValue_t*)my->g_param_spec_get_default_value(spec);
|
||||
static int cnt = 0;
|
||||
if(cnt==4) cnt=0;
|
||||
static my_GValue_t value[4];
|
||||
unalignGValue(&value[cnt], &v);
|
||||
return &value[cnt++];
|
||||
}
|
||||
|
||||
#define CUSTOM_INIT \
|
||||
InitGTKClass(lib->priv.w.bridge); \
|
||||
InitGTKClass(lib->priv.w.bridge); \
|
||||
lib->priv.w.p2 = getGobject2My(lib); \
|
||||
my_lib = lib; \
|
||||
SetGObjectID(((gobject2_my_t*)lib->priv.w.p2)->g_object_get_type()); \
|
||||
SetGTypeName(((gobject2_my_t*)lib->priv.w.p2)->g_type_name); \
|
||||
lib->priv.w.needed = 1; \
|
||||
@@ -717,7 +832,8 @@ EXPORT void my_g_object_set_data_full(x86emu_t* emu, void* object, void* key, vo
|
||||
#define CUSTOM_FINI \
|
||||
FiniGTKClass(); \
|
||||
freeGobject2My(lib->priv.w.p2); \
|
||||
free(lib->priv.w.p2);
|
||||
free(lib->priv.w.p2); \
|
||||
my_lib = NULL;
|
||||
|
||||
#include "wrappedlib_init.h"
|
||||
|
||||
@@ -174,7 +174,7 @@ GO(g_param_spec_enum, pFpppiii)
|
||||
GO(g_param_spec_flags, pFpppiui)
|
||||
GO(g_param_spec_float, pFpppfffi)
|
||||
GO(g_param_spec_get_blurb, pFp)
|
||||
GO(g_param_spec_get_default_value, pFp)
|
||||
GOM(g_param_spec_get_default_value, pFp)
|
||||
GO(g_param_spec_get_name, pFp)
|
||||
GO(g_param_spec_get_nick, pFp)
|
||||
GO(g_param_spec_get_qdata, pFpu)
|
||||
@@ -210,11 +210,11 @@ GO(g_param_spec_unref, vFp)
|
||||
GO(g_param_spec_value_array, pFppppi)
|
||||
GO(g_param_spec_variant, pFpppppi)
|
||||
GOM(g_param_type_register_static, iFEpp)
|
||||
GO(g_param_value_convert, iFpppi)
|
||||
GO(g_param_value_defaults, iFpp)
|
||||
GO(g_param_values_cmp, iFppp)
|
||||
GO(g_param_value_set_default, vFpp)
|
||||
GO(g_param_value_validate, iFpp)
|
||||
GO(g_param_value_convert, iFpGGi)
|
||||
GO(g_param_value_defaults, iFpG)
|
||||
GO(g_param_values_cmp, iFpGG)
|
||||
GO(g_param_value_set_default, vFpG)
|
||||
GO(g_param_value_validate, iFpG)
|
||||
//GO(g_pointer_type_register_static,
|
||||
//GO(g_pollfd_get_type,
|
||||
//GO(g_ptr_array_get_type,
|
||||
@@ -262,7 +262,7 @@ GO(g_signal_type_cclosure_new, pFiu) //should wrap?
|
||||
GO(g_source_get_type, iFv)
|
||||
//GO(g_source_set_closure,
|
||||
//GO(g_source_set_dummy_callback,
|
||||
GO(g_strdup_value_contents, pFp)
|
||||
GO(g_strdup_value_contents, pFG)
|
||||
GO(g_strv_get_type, iFv)
|
||||
GO(g_thread_get_type, iFv)
|
||||
GO(g_time_zone_get_type, iFv)
|
||||
@@ -287,7 +287,7 @@ GO(g_type_class_adjust_private_offset, vFpp)
|
||||
GO(g_type_class_get_instance_private_offset, iFp)
|
||||
GO(g_type_class_get_private, pFpi)
|
||||
GO(g_type_class_peek, pFi)
|
||||
GO(g_type_class_peek_parent, pFp)
|
||||
GOM(g_type_class_peek_parent, pFEp)
|
||||
GO(g_type_class_peek_static, pFi)
|
||||
GO(g_type_class_ref, pFp)
|
||||
GO(g_type_class_unref, vFp)
|
||||
@@ -344,88 +344,88 @@ GOM(g_type_register_static_simple, iFEipupupi)
|
||||
GO(g_type_set_qdata, vFipp)
|
||||
GO(g_type_test_flags, iFiu)
|
||||
//GOM(g_type_value_table_peek, pFEi) //need to bridge GTypeValueTable
|
||||
GO(g_value_array_append, pFpp)
|
||||
GO(g_value_array_append, pFpp) //TODO: does GValueArray needs alignement?
|
||||
GO(g_value_array_copy, pFp)
|
||||
GO(g_value_array_free, vFp)
|
||||
GO(g_value_array_get_nth, pFpu)
|
||||
GO(g_value_array_get_type, iFv)
|
||||
GO(g_value_array_insert, pFpup)
|
||||
GO(g_value_array_insert, pFpuG)
|
||||
GO(g_value_array_new, pFu)
|
||||
GO(g_value_array_prepend, pFpp)
|
||||
GO(g_value_array_prepend, pFpG)
|
||||
GO(g_value_array_remove, pFpu)
|
||||
GOM(g_value_array_sort, pFEpp)
|
||||
GOM(g_value_array_sort_with_data, pFEppp)
|
||||
GO(g_value_copy, vFpp)
|
||||
GO(g_value_dup_boxed, pFp)
|
||||
GO(g_value_dup_object, pFp)
|
||||
GO(g_value_dup_param, pFp)
|
||||
GO(g_value_dup_string, pFp)
|
||||
GO(g_value_dup_variant, pFp)
|
||||
GO(g_value_fits_pointer, iFp)
|
||||
GO(g_value_get_boolean, iFp)
|
||||
GO(g_value_get_boxed, pFp)
|
||||
GO(g_value_get_char, CFp)
|
||||
GO(g_value_get_double, dFp)
|
||||
GO(g_value_get_enum, iFp)
|
||||
GO(g_value_get_flags, uFp)
|
||||
GO(g_value_get_float, fFp)
|
||||
GO(g_value_get_gtype, iFp)
|
||||
GO(g_value_get_int, iFp)
|
||||
GO(g_value_get_int64, IFp)
|
||||
GO(g_value_get_long, lFp)
|
||||
GO(g_value_get_object, pFp)
|
||||
GO(g_value_get_param, pFp)
|
||||
GO(g_value_get_pointer, pFp)
|
||||
GO(g_value_get_schar, cFp)
|
||||
GO(g_value_get_string, pFp)
|
||||
GOM(g_value_array_sort, pFEpp) // TODO: need to use a CompareFunct with GValue alignment work
|
||||
GOM(g_value_array_sort_with_data, pFEppp) //TODO: same here
|
||||
GO(g_value_copy, vFGG)
|
||||
GO(g_value_dup_boxed, pFG)
|
||||
GO(g_value_dup_object, pFG)
|
||||
GO(g_value_dup_param, pFG)
|
||||
GO(g_value_dup_string, pFG)
|
||||
GO(g_value_dup_variant, pFG)
|
||||
GO(g_value_fits_pointer, iFG)
|
||||
GO(g_value_get_boolean, iFG)
|
||||
GO(g_value_get_boxed, pFG)
|
||||
GO(g_value_get_char, CFG)
|
||||
GO(g_value_get_double, dFG)
|
||||
GO(g_value_get_enum, iFG)
|
||||
GO(g_value_get_flags, uFG)
|
||||
GO(g_value_get_float, fFG)
|
||||
GO(g_value_get_gtype, iFG)
|
||||
GO(g_value_get_int, iFG)
|
||||
GO(g_value_get_int64, IFG)
|
||||
GO(g_value_get_long, lFG)
|
||||
GO(g_value_get_object, pFG)
|
||||
GO(g_value_get_param, pFG)
|
||||
GO(g_value_get_pointer, pFG)
|
||||
GO(g_value_get_schar, cFG)
|
||||
GO(g_value_get_string, pFG)
|
||||
GO(g_value_get_type, iFv)
|
||||
GO(g_value_get_uchar, CFp)
|
||||
GO(g_value_get_uint, uFp)
|
||||
GO(g_value_get_uint64, UFp)
|
||||
GO(g_value_get_ulong, LFp)
|
||||
GO(g_value_get_variant, pFp)
|
||||
GO(g_value_init, pFpi)
|
||||
GO(g_value_init_from_instance, vFpp)
|
||||
GO(g_value_peek_pointer, pFp)
|
||||
GO(g_value_get_uchar, CFG)
|
||||
GO(g_value_get_uint, uFG)
|
||||
GO(g_value_get_uint64, UFG)
|
||||
GO(g_value_get_ulong, LFG)
|
||||
GO(g_value_get_variant, pFG)
|
||||
GOM(g_value_init, pFpi)
|
||||
GO(g_value_init_from_instance, vFGp)
|
||||
GO(g_value_peek_pointer, pFG)
|
||||
GOM(g_value_register_transform_func, vFEiip)
|
||||
GO(g_value_reset, pFp)
|
||||
GO(g_value_set_boolean, vFpi)
|
||||
GO(g_value_set_boxed, vFpp)
|
||||
GO(g_value_set_boxed_take_ownership, vFpp)
|
||||
GO(g_value_set_char, vFpC)
|
||||
GO(g_value_set_double, vFpd)
|
||||
GO(g_value_set_enum, vFpi)
|
||||
GO(g_value_set_flags, vFpu)
|
||||
GO(g_value_set_float, vFpf)
|
||||
GO(g_value_set_gtype, vFpi)
|
||||
GO(g_value_set_instance, vFpp)
|
||||
GO(g_value_set_int, vFpi)
|
||||
GO(g_value_set_int64, vFpI)
|
||||
GO(g_value_set_long, vFpl)
|
||||
GO(g_value_set_object, vFpp)
|
||||
GO(g_value_set_object_take_ownership, vFpp)
|
||||
GO(g_value_set_param, vFpp)
|
||||
GO(g_value_set_param_take_ownership, vFpp)
|
||||
GO(g_value_set_pointer, vFpp)
|
||||
GO(g_value_set_schar, vFpc)
|
||||
GO(g_value_set_static_boxed, vFpp)
|
||||
GO(g_value_set_static_string, vFpp)
|
||||
GO(g_value_set_string, vFpp)
|
||||
GO(g_value_set_string_take_ownership, vFpp)
|
||||
GO(g_value_set_uchar, vFpC)
|
||||
GO(g_value_set_uint, vFpu)
|
||||
GO(g_value_set_uint64, vFpU)
|
||||
GO(g_value_set_ulong, vFpL)
|
||||
GO(g_value_set_variant, vFpp)
|
||||
GO(g_value_take_boxed, vFpp)
|
||||
GO(g_value_take_object, vFpp)
|
||||
GO(g_value_take_param, vFpp)
|
||||
GO(g_value_take_string, vFpp)
|
||||
GO(g_value_take_variant, vFpp)
|
||||
GO(g_value_transform, iFpp)
|
||||
GOM(g_value_reset, pFp)
|
||||
GO(g_value_set_boolean, vFGi)
|
||||
GO(g_value_set_boxed, vFGp)
|
||||
GO(g_value_set_boxed_take_ownership, vFGp)
|
||||
GO(g_value_set_char, vFGC)
|
||||
GO(g_value_set_double, vFGd)
|
||||
GO(g_value_set_enum, vFGi)
|
||||
GO(g_value_set_flags, vFGu)
|
||||
GO(g_value_set_float, vFGf)
|
||||
GO(g_value_set_gtype, vFGi)
|
||||
GO(g_value_set_instance, vFGp)
|
||||
GO(g_value_set_int, vFGi)
|
||||
GO(g_value_set_int64, vFGI)
|
||||
GO(g_value_set_long, vFGl)
|
||||
GO(g_value_set_object, vFGp)
|
||||
GO(g_value_set_object_take_ownership, vFGp)
|
||||
GO(g_value_set_param, vFGp)
|
||||
GO(g_value_set_param_take_ownership, vFGp)
|
||||
GO(g_value_set_pointer, vFGp)
|
||||
GO(g_value_set_schar, vFGc)
|
||||
GO(g_value_set_static_boxed, vFGp)
|
||||
GO(g_value_set_static_string, vFGp)
|
||||
GO(g_value_set_string, vFGp)
|
||||
GO(g_value_set_string_take_ownership, vFGp)
|
||||
GO(g_value_set_uchar, vFGC)
|
||||
GO(g_value_set_uint, vFGu)
|
||||
GO(g_value_set_uint64, vFGU)
|
||||
GO(g_value_set_ulong, vFGL)
|
||||
GO(g_value_set_variant, vFGp)
|
||||
GO(g_value_take_boxed, vFGp)
|
||||
GO(g_value_take_object, vFGp)
|
||||
GO(g_value_take_param, vFGp)
|
||||
GO(g_value_take_string, vFGp)
|
||||
GO(g_value_take_variant, vFGp)
|
||||
GO(g_value_transform, iFGG)
|
||||
GO(g_value_type_compatible, iFii)
|
||||
GO(g_value_type_transformable, iFii)
|
||||
GO(g_value_unset, vFp)
|
||||
GO(g_value_unset, vFG)
|
||||
//GO(g_variant_builder_get_type,
|
||||
//GO(g_variant_dict_get_type,
|
||||
//GO(g_variant_get_gtype,
|
||||
@@ -440,4 +440,6 @@ GO(g_value_unset, vFp)
|
||||
GO(dummy_set_property, vFpupp)
|
||||
GO(dummy_drag_data_get, vFpppuu)
|
||||
GO(dummy_drag_motion, iFppiiu)
|
||||
GO(dummy_drag_data_received, vFppiipuu)
|
||||
GO(dummy_drag_data_received, vFppiipuu)
|
||||
GO(dummy_marshal, vFppuppp)
|
||||
GO(dummy_marshalv, vFpppppip)
|
||||
Executable
+716
@@ -0,0 +1,716 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "wrappedlibs.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "wrapper.h"
|
||||
#include "bridge.h"
|
||||
#include "librarian/library_private.h"
|
||||
#include "x86emu.h"
|
||||
#include "emu/x86emu_private.h"
|
||||
#include "callback.h"
|
||||
#include "librarian.h"
|
||||
#include "box86context.h"
|
||||
#include "emu/x86emu_private.h"
|
||||
#include "myalign.h"
|
||||
#include "gtkclass.h"
|
||||
|
||||
const char* gtk3Name = "libgtk-3.so.0";
|
||||
static char* libname = NULL;
|
||||
#define LIBNAME gtk3
|
||||
|
||||
typedef int (*iFv_t)(void);
|
||||
typedef void* (*pFi_t)(int);
|
||||
typedef void (*vFp_t)(void*);
|
||||
typedef void* (*pFp_t)(void*);
|
||||
typedef double (*dFp_t)(void*);
|
||||
typedef int (*iFip_t)(int, void*);
|
||||
typedef int (*iFpp_t)(void*, void*);
|
||||
typedef void* (*pFpi_t)(void*, int);
|
||||
typedef void (*vFpp_t)(void*, void*);
|
||||
typedef void* (*pFppi_t)(void*, void*, int32_t);
|
||||
typedef int32_t (*iFppp_t)(void*, void*, void*);
|
||||
typedef uint32_t (*uFupp_t)(uint32_t, void*, void*);
|
||||
typedef void (*vFppp_t)(void*, void*, void*);
|
||||
typedef int (*iFpppp_t)(void*, void*, void*, void*);
|
||||
typedef void (*vFpppp_t)(void*, void*, void*, void*);
|
||||
typedef void (*vFpippp_t)(void*, int, void*, void*, void*);
|
||||
typedef int (*iFpppppp_t)(void*, void*, void*, void*, void*, void*);
|
||||
typedef int (*iFppuppp_t)(void*, void*, uint32_t, void*, void*, void*);
|
||||
typedef void* (*pFppppppi_t)(void*, void*, void*, void*, void*, void*, int);
|
||||
typedef void* (*pFppppppp_t)(void*, void*, void*, void*, void*, void*, void*);
|
||||
typedef void* (*pFpppppppi_t)(void*, void*, void*, void*, void*, void*, void*, int);
|
||||
typedef void (*vFpppppuu_t)(void*, void*, void*, void*, void*, uint32_t, uint32_t);
|
||||
typedef unsigned long (*LFppppppii_t)(void*, void*, void*, void*, void*, void*, int32_t, int32_t);
|
||||
typedef void* (*pFpippppppp_t)(void*, int, void*, void*, void*, void*, void*, void*, void*);
|
||||
typedef void* (*pFpipppppppi_t)(void*, int, void*, void*, void*, void*, void*, void*, void*, int);
|
||||
|
||||
#define SUPER() \
|
||||
GO(gtk_object_get_type, iFv_t) \
|
||||
GO(gtk_object_set_data_full, vFpppp_t) \
|
||||
GO(g_type_check_instance_cast, pFpi_t) \
|
||||
GO(gtk_bin_get_type, iFv_t) \
|
||||
GO(gtk_widget_get_type, iFv_t) \
|
||||
GO(gtk_button_get_type, iFv_t) \
|
||||
GO(gtk_container_get_type, iFv_t) \
|
||||
GO(gtk_label_get_type, iFv_t) \
|
||||
GO(gtk_tree_view_get_type, iFv_t) \
|
||||
GO(gtk_type_class, pFi_t) \
|
||||
GO(gtk_button_get_label, pFp_t) \
|
||||
GO(gtk_signal_connect_full, LFppppppii_t) \
|
||||
GO(gtk_dialog_add_button, pFppi_t) \
|
||||
GO(gtk_message_dialog_format_secondary_text, vFpp_t) \
|
||||
GO(gtk_message_dialog_format_secondary_markup, vFpp_t) \
|
||||
GO(gtk_init, vFpp_t) \
|
||||
GO(gtk_init_check, iFpp_t) \
|
||||
GO(gtk_init_with_args, iFpppppp_t) \
|
||||
GO(gtk_menu_attach_to_widget, vFppp_t) \
|
||||
GO(gtk_menu_popup, vFpppppuu_t) \
|
||||
GO(gtk_timeout_add, uFupp_t) \
|
||||
GO(gtk_clipboard_set_with_data, iFppuppp_t) \
|
||||
GO(gtk_clipboard_set_with_owner, iFppuppp_t)\
|
||||
GO(gtk_stock_set_translate_func, vFpppp_t) \
|
||||
GO(gtk_container_forall, vFppp_t) \
|
||||
GO(gtk_tree_view_set_search_equal_func, vFpppp_t) \
|
||||
GO(gtk_text_iter_backward_find_char, iFpppp_t) \
|
||||
GO(gtk_text_iter_forward_find_char, iFpppp_t) \
|
||||
GO(gtk_toolbar_append_item, pFppppppp_t) \
|
||||
GO(gtk_toolbar_prepend_item, pFppppppp_t) \
|
||||
GO(gtk_toolbar_insert_item, pFpppppppi_t) \
|
||||
GO(gtk_toolbar_append_element, pFpippppppp_t) \
|
||||
GO(gtk_toolbar_prepend_element, pFpippppppp_t) \
|
||||
GO(gtk_toolbar_insert_element, pFpipppppppi_t) \
|
||||
GO(gtk_toolbar_insert_stock, pFppppppi_t) \
|
||||
GO(gtk_tree_sortable_set_sort_func, vFpippp_t) \
|
||||
GO(gtk_tree_sortable_set_default_sort_func, vFpppp_t)\
|
||||
GO(gtk_type_unique, iFip_t) \
|
||||
GO(gtk_spin_button_get_value, dFp_t) \
|
||||
GO(gtk_builder_connect_signals_full, vFppp_t) \
|
||||
GO(gtk_action_get_type, iFv_t) \
|
||||
GO(g_type_class_ref, pFi_t) \
|
||||
GO(g_type_class_unref, vFp_t) \
|
||||
|
||||
|
||||
typedef struct gtk3_my_s {
|
||||
// functions
|
||||
#define GO(A, B) B A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
} gtk3_my_t;
|
||||
|
||||
static void* getGtk3My(library_t* lib)
|
||||
{
|
||||
gtk3_my_t* my = (gtk3_my_t*)calloc(1, sizeof(gtk3_my_t));
|
||||
#define GO(A, W) my->A = (W)dlsym(lib->priv.w.lib, #A);
|
||||
SUPER()
|
||||
#undef GO
|
||||
return my;
|
||||
}
|
||||
#undef SUPER
|
||||
|
||||
static void freeGtk3My(void* lib)
|
||||
{
|
||||
//gtk3_my_t *my = (gtk3_my_t *)lib;
|
||||
}
|
||||
|
||||
static box86context_t* context = NULL;
|
||||
|
||||
EXPORT uintptr_t my3_gtk_signal_connect_full(x86emu_t* emu, void* object, void* name, void* c_handler, void* unsupported, void* data, void* closure, uint32_t signal, int after)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
if(!context)
|
||||
context = emu->context;
|
||||
|
||||
my_signal_t *sig = new_mysignal(c_handler, data, closure);
|
||||
uintptr_t ret = my->gtk_signal_connect_full(object, name, my_signal_cb, NULL, sig, my_signal_delete, signal, after);
|
||||
printf_log(LOG_DEBUG, "Connecting gtk signal \"%s\" with cb=%p\n", (char*)name, sig);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define SUPER() \
|
||||
GO(0) \
|
||||
GO(1) \
|
||||
GO(2) \
|
||||
GO(3)
|
||||
|
||||
// GtkMenuDetachFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_menudetach_fct_##A = 0; \
|
||||
static void my_menudetach_##A(void* widget, void* menu) \
|
||||
{ \
|
||||
RunFunction(my_context, my_menudetach_fct_##A, 2, widget, menu);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findMenuDetachFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_menudetach_fct_##A == (uintptr_t)fct) return my_menudetach_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_menudetach_fct_##A == 0) {my_menudetach_fct_##A = (uintptr_t)fct; return my_menudetach_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GMenuDetachFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkMenuPositionFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_menuposition_fct_##A = 0; \
|
||||
static void my_menuposition_##A(void* menu, void* x, void* y, void* push_in, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_menuposition_fct_##A, 5, menu, x, y, push_in, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findMenuPositionFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_menuposition_fct_##A == (uintptr_t)fct) return my_menuposition_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_menuposition_fct_##A == 0) {my_menuposition_fct_##A = (uintptr_t)fct; return my_menuposition_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkMenuPositionFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkFunction
|
||||
#define GO(A) \
|
||||
static uintptr_t my3_gtkfunction_fct_##A = 0; \
|
||||
static int my3_gtkfunction_##A(void* data) \
|
||||
{ \
|
||||
return RunFunction(my_context, my3_gtkfunction_fct_##A, 1, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGtkFunctionFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my3_gtkfunction_fct_##A == (uintptr_t)fct) return my3_gtkfunction_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my3_gtkfunction_fct_##A == 0) {my3_gtkfunction_fct_##A = (uintptr_t)fct; return my3_gtkfunction_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkFunction callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkClipboardGetFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_clipboardget_fct_##A = 0; \
|
||||
static void my_clipboardget_##A(void* clipboard, void* selection, uint32_t info, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_clipboardget_fct_##A, 4, clipboard, selection, info, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findClipboadGetFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_clipboardget_fct_##A == (uintptr_t)fct) return my_clipboardget_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_clipboardget_fct_##A == 0) {my_clipboardget_fct_##A = (uintptr_t)fct; return my_clipboardget_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkClipboardGetFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkClipboardClearFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_clipboardclear_fct_##A = 0; \
|
||||
static void my_clipboardclear_##A(void* clipboard, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_clipboardclear_fct_##A, 2, clipboard, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findClipboadClearFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_clipboardclear_fct_##A == (uintptr_t)fct) return my_clipboardclear_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_clipboardclear_fct_##A == 0) {my_clipboardclear_fct_##A = (uintptr_t)fct; return my_clipboardclear_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkClipboardClearFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkCallback
|
||||
#define GO(A) \
|
||||
static uintptr_t my3_gtkcallback_fct_##A = 0; \
|
||||
static void my3_gtkcallback_##A(void* widget, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my3_gtkcallback_fct_##A, 2, widget, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGtkCallbackFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my3_gtkcallback_fct_##A == (uintptr_t)fct) return my3_gtkcallback_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my3_gtkcallback_fct_##A == 0) {my3_gtkcallback_fct_##A = (uintptr_t)fct; return my3_gtkcallback_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkCallback callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkTextCharPredicate
|
||||
#define GO(A) \
|
||||
static uintptr_t my_textcharpredicate_fct_##A = 0; \
|
||||
static int my_textcharpredicate_##A(uint32_t ch, void* data) \
|
||||
{ \
|
||||
return (int)RunFunction(my_context, my_textcharpredicate_fct_##A, 2, ch, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGtkTextCharPredicateFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_textcharpredicate_fct_##A == (uintptr_t)fct) return my_textcharpredicate_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_textcharpredicate_fct_##A == 0) {my_textcharpredicate_fct_##A = (uintptr_t)fct; return my_textcharpredicate_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkTextCharPredicate callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Toolbar
|
||||
#define GO(A) \
|
||||
static uintptr_t my_toolbar_fct_##A = 0; \
|
||||
static void my_toolbar_##A(void* widget, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_toolbar_fct_##A, 2, widget, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findToolbarFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_toolbar_fct_##A == (uintptr_t)fct) return my_toolbar_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_toolbar_fct_##A == 0) {my_toolbar_fct_##A = (uintptr_t)fct; return my_toolbar_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 Toolbar callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Builder
|
||||
#define GO(A) \
|
||||
static uintptr_t my_builderconnect_fct_##A = 0; \
|
||||
static void my_builderconnect_##A(void* builder, void* object, void* signal, void* handler, void* connect, int flags, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_builderconnect_fct_##A, 7, builder, object, signal, handler, connect, flags, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findBuilderConnectFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_builderconnect_fct_##A == (uintptr_t)fct) return my_builderconnect_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_builderconnect_fct_##A == 0) {my_builderconnect_fct_##A = (uintptr_t)fct; return my_builderconnect_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 BuilderConnect callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#undef SUPER
|
||||
|
||||
EXPORT void my3_gtk_dialog_add_buttons(x86emu_t* emu, void* dialog, void* first, uintptr_t* b)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
void* btn = first;
|
||||
while(btn) {
|
||||
int id = (int)*(b++);
|
||||
my->gtk_dialog_add_button(dialog, btn, id);
|
||||
btn = (void*)*(b++);
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_message_dialog_format_secondary_text(x86emu_t* emu, void* dialog, void* fmt, void* b)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
char* buf = NULL;
|
||||
#ifndef NOALIGN
|
||||
myStackAlign((const char*)fmt, b, emu->scratch);
|
||||
iFppp_t f = (iFppp_t)vasprintf;
|
||||
f(&buf, fmt, emu->scratch);
|
||||
#else
|
||||
iFppp_t f = (iFppp_t)vasprintf;
|
||||
f(&buf, fmt, b);
|
||||
#endif
|
||||
// pre-bake the fmt/vaarg, because there is no "va_list" version of this function
|
||||
my->gtk_message_dialog_format_secondary_text(dialog, buf);
|
||||
free(buf);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_message_dialog_format_secondary_markup(x86emu_t* emu, void* dialog, void* fmt, void* b)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
char* buf = NULL;
|
||||
#ifndef NOALIGN
|
||||
myStackAlign((const char*)fmt, b, emu->scratch);
|
||||
iFppp_t f = (iFppp_t)vasprintf;
|
||||
f(&buf, fmt, emu->scratch);
|
||||
#else
|
||||
iFppp_t f = (iFppp_t)vasprintf;
|
||||
f(&buf, fmt, b);
|
||||
#endif
|
||||
// pre-bake the fmt/vaarg, because there is no "va_list" version of this function
|
||||
my->gtk_message_dialog_format_secondary_markup(dialog, buf);
|
||||
free(buf);
|
||||
}
|
||||
EXPORT void* my3_gtk_type_class(x86emu_t* emu, int type)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
void* class = my->gtk_type_class(type);
|
||||
return wrapCopyGTKClass(class, type);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_init(x86emu_t* emu, void* argc, void* argv)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_init(argc, argv);
|
||||
my_checkGlobalGdkDisplay();
|
||||
AutoBridgeGtk(my->g_type_class_ref, my->g_type_class_unref);
|
||||
}
|
||||
|
||||
EXPORT int my3_gtk_init_check(x86emu_t* emu, void* argc, void* argv)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
int ret = my->gtk_init_check(argc, argv);
|
||||
my_checkGlobalGdkDisplay();
|
||||
AutoBridgeGtk(my->g_type_class_ref, my->g_type_class_unref);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT int my3_gtk_init_with_args(x86emu_t* emu, void* argc, void* argv, void* param, void* entries, void* trans, void* error)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
int ret = my->gtk_init_with_args(argc, argv, param, entries, trans, error);
|
||||
my_checkGlobalGdkDisplay();
|
||||
AutoBridgeGtk(my->g_type_class_ref, my->g_type_class_unref);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_menu_attach_to_widget(x86emu_t* emu, void* menu, void* widget, void* f)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_menu_attach_to_widget(menu, widget, findMenuDetachFct(f));
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_menu_popup(x86emu_t* emu, void* menu, void* shell, void* item, void* f, void* data, uint32_t button, uint32_t time_)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_menu_popup(menu, shell, item, findMenuPositionFct(f), data, button, time_);
|
||||
}
|
||||
|
||||
EXPORT uint32_t my3_gtk_timeout_add(x86emu_t* emu, uint32_t interval, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_timeout_add(interval, findGtkFunctionFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT int my3_gtk_clipboard_set_with_data(x86emu_t* emu, void* clipboard, void* target, uint32_t n, void* f_get, void* f_clear, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_clipboard_set_with_data(clipboard, target, n, findClipboadGetFct(f_get), findClipboadClearFct(f_clear), data);
|
||||
}
|
||||
|
||||
EXPORT int my3_gtk_clipboard_set_with_owner(x86emu_t* emu, void* clipboard, void* target, uint32_t n, void* f_get, void* f_clear, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_clipboard_set_with_owner(clipboard, target, n, findClipboadGetFct(f_get), findClipboadClearFct(f_clear), data);
|
||||
}
|
||||
|
||||
static void* my_translate_func(void* path, my_signal_t* sig)
|
||||
{
|
||||
return (void*)RunFunction(my_context, sig->c_handler, 2, path, sig->data);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_stock_set_translate_func(x86emu_t* emu, void* domain, void* f, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my_signal_t *sig = new_mysignal(f, data, notify);
|
||||
my->gtk_stock_set_translate_func(domain, my_translate_func, sig, my_signal_delete);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_container_forall(x86emu_t* emu, void* container, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_container_forall(container, findGtkCallbackFct(f), data);
|
||||
}
|
||||
|
||||
static int my_tree_view_search_equal(void* model, int column, void* key, void* iter, x86emu_t* emu)
|
||||
{
|
||||
SetCallbackArgs(emu, 4, model, column, key, iter);
|
||||
return (int)RunCallback(emu);
|
||||
}
|
||||
|
||||
static void my_destroy_notify(void* data)
|
||||
{
|
||||
x86emu_t *emu = (x86emu_t*)data;
|
||||
uintptr_t f = (uintptr_t)GetCallbackArg(emu, 9);
|
||||
if(f) {
|
||||
SetCallbackArg(emu, 0, GetCallbackArg(emu, 8));
|
||||
SetCallbackNArg(emu, 1);
|
||||
SetCallbackAddress(emu, f);
|
||||
RunCallback(emu);
|
||||
}
|
||||
FreeCallback(emu);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_tree_view_set_search_equal_func(x86emu_t* emu, void* tree_view, void* f, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
if(!f)
|
||||
my->gtk_tree_view_set_search_equal_func(tree_view, f, data, notify); // notify will be NULL to right? But f can be NULL?
|
||||
|
||||
x86emu_t* cb = AddCallback(emu, (uintptr_t)f, 5, NULL, NULL, NULL, NULL);
|
||||
SetCallbackArg(cb, 4, data);
|
||||
SetCallbackNArgs(cb, 8, 2, data, notify);
|
||||
|
||||
my->gtk_tree_view_set_search_equal_func(tree_view, my_tree_view_search_equal, cb, my_destroy_notify);
|
||||
}
|
||||
|
||||
EXPORT int my3_gtk_text_iter_backward_find_char(x86emu_t* emu, void* iter, void* f, void* data, void* limit)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_text_iter_backward_find_char(iter, findGtkTextCharPredicateFct(f), data, limit);
|
||||
}
|
||||
|
||||
EXPORT int my3_gtk_text_iter_forward_find_char(x86emu_t* emu, void* iter, void* f, void* data, void* limit)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_text_iter_forward_find_char(iter, findGtkTextCharPredicateFct(f), data, limit);
|
||||
}
|
||||
|
||||
EXPORT void* my3_gtk_toolbar_append_item(x86emu_t* emu, void* toolbar, void* text, void* tooltip_text, void* tooltip_private, void* icon, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_toolbar_append_item(toolbar, text, tooltip_text, tooltip_private, icon, findToolbarFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void* my3_gtk_toolbar_prepend_item(x86emu_t* emu, void* toolbar, void* text, void* tooltip_text, void* tooltip_private, void* icon, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_toolbar_prepend_item(toolbar, text, tooltip_text, tooltip_private, icon, findToolbarFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void* my3_gtk_toolbar_insert_item(x86emu_t* emu, void* toolbar, void* text, void* tooltip_text, void* tooltip_private, void* icon, void* f, void* data, int position)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_toolbar_insert_item(toolbar, text, tooltip_text, tooltip_private, icon, findToolbarFct(f), data, position);
|
||||
}
|
||||
|
||||
EXPORT void* my3_gtk_toolbar_append_element(x86emu_t* emu, void* toolbar, int type, void* widget, void* text, void* tooltip_text, void* tooltip_private, void* icon, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_toolbar_append_element(toolbar, type, widget, text, tooltip_text, tooltip_private, icon, findToolbarFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void* my3_gtk_toolbar_prepend_element(x86emu_t* emu, void* toolbar, int type, void* widget, void* text, void* tooltip_text, void* tooltip_private, void* icon, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_toolbar_prepend_element(toolbar, type, widget, text, tooltip_text, tooltip_private, icon, findToolbarFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void* my3_gtk_toolbar_insert_element(x86emu_t* emu, void* toolbar, int type, void* widget, void* text, void* tooltip_text, void* tooltip_private, void* icon, void* f, void* data, int position)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_toolbar_insert_element(toolbar, type, widget, text, tooltip_text, tooltip_private, icon, findToolbarFct(f), data, position);
|
||||
}
|
||||
|
||||
EXPORT void* my3_gtk_toolbar_insert_stock(x86emu_t* emu, void* toolbar, void* stock_id, void* tooltip_text, void* tooltip_private, void* f, void* data, int position)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_toolbar_insert_stock(toolbar, stock_id, tooltip_text, tooltip_private, findToolbarFct(f), data, position);
|
||||
}
|
||||
|
||||
static int my_tree_iter_compare(void* model, void* a, void* b, x86emu_t* emu)
|
||||
{
|
||||
SetCallbackArgs(emu, 3, model, a, b);
|
||||
return (int)RunCallback(emu);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_tree_sortable_set_sort_func(x86emu_t* emu, void* sortable, int id, void* f, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
if(!f)
|
||||
my->gtk_tree_sortable_set_sort_func(sortable, id, f, data, notify);
|
||||
|
||||
void* native_f = GetNativeFnc((uintptr_t)f);
|
||||
void* native_notify = GetNativeFnc((uintptr_t)notify);
|
||||
if(native_f && (native_notify || !notify))
|
||||
return my->gtk_tree_sortable_set_sort_func(sortable, id, native_f, data, native_notify);
|
||||
|
||||
x86emu_t* cb = AddCallback(emu, (uintptr_t)f, 4, NULL, NULL, NULL, data);
|
||||
SetCallbackNArgs(cb, 8, 2, data, notify);
|
||||
|
||||
my->gtk_tree_sortable_set_sort_func(sortable, id, my_tree_iter_compare, cb, my_destroy_notify);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_tree_sortable_set_default_sort_func(x86emu_t* emu, void* sortable, void* f, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
if(!f)
|
||||
my->gtk_tree_sortable_set_default_sort_func(sortable, f, data, notify);
|
||||
|
||||
void* native_f = GetNativeFnc((uintptr_t)f);
|
||||
void* native_notify = GetNativeFnc((uintptr_t)notify);
|
||||
if(native_f && (native_notify || !notify))
|
||||
return my->gtk_tree_sortable_set_default_sort_func(sortable, native_f, data, native_notify);
|
||||
|
||||
x86emu_t* cb = AddCallback(emu, (uintptr_t)f, 4, NULL, NULL, NULL, data);
|
||||
SetCallbackNArgs(cb, 8, 2, data, notify);
|
||||
|
||||
my->gtk_tree_sortable_set_default_sort_func(sortable, my_tree_iter_compare, cb, my_destroy_notify);
|
||||
}
|
||||
|
||||
EXPORT int my3_gtk_type_unique(x86emu_t* emu, int parent, my_GtkTypeInfo_t* gtkinfo)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_type_unique(parent, findFreeGtkTypeInfo(gtkinfo, parent));
|
||||
}
|
||||
|
||||
EXPORT unsigned long my3_gtk_signal_connect(x86emu_t* emu, void* object, void* name, void* func, void* data)
|
||||
{
|
||||
return my3_gtk_signal_connect_full(emu, object, name, func, NULL, data, NULL, 0, 0);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_object_set_data_full(x86emu_t* emu, void* object, void* key, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
void* native_notify = GetNativeFnc((uintptr_t)notify);
|
||||
if(!notify || native_notify)
|
||||
return my->gtk_object_set_data_full(object, key, data, native_notify);
|
||||
|
||||
x86emu_t* cb = AddCallback(emu, 0, 0, NULL, NULL, NULL, NULL);
|
||||
SetCallbackNArgs(cb, 8, 2, data, notify);
|
||||
my->gtk_object_set_data_full(object, key, cb, my_destroy_notify);
|
||||
}
|
||||
|
||||
EXPORT float my3_gtk_spin_button_get_value_as_float(x86emu_t* emu, void* spinner)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
return my->gtk_spin_button_get_value(spinner);
|
||||
}
|
||||
|
||||
EXPORT void my3_gtk_builder_connect_signals_full(x86emu_t* emu, void* builder, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtk3_my_t *my = (gtk3_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_builder_connect_signals_full(builder, findBuilderConnectFct(f), data);
|
||||
}
|
||||
//GtkMisc is deprecated in GTK3, so use widget directly...
|
||||
#define CUSTOM_INIT \
|
||||
libname = lib->name; \
|
||||
lib->priv.w.p2 = getGtk3My(lib); \
|
||||
lib->altmy = strdup("my3_"); \
|
||||
SetGtkWidgetID(((gtk3_my_t*)lib->priv.w.p2)->gtk_widget_get_type()); \
|
||||
SetGtkContainerID(((gtk3_my_t*)lib->priv.w.p2)->gtk_container_get_type()); \
|
||||
SetGtkActionID(((gtk3_my_t*)lib->priv.w.p2)->gtk_action_get_type()); \
|
||||
SetGtkMiscID(((gtk3_my_t*)lib->priv.w.p2)->gtk_widget_get_type()); \
|
||||
SetGtkLabelID(((gtk3_my_t*)lib->priv.w.p2)->gtk_label_get_type()); \
|
||||
SetGtkTreeViewID(((gtk3_my_t*)lib->priv.w.p2)->gtk_tree_view_get_type()); \
|
||||
lib->priv.w.needed = 2; \
|
||||
lib->priv.w.neededlibs = (char**)calloc(lib->priv.w.needed, sizeof(char*)); \
|
||||
lib->priv.w.neededlibs[0] = strdup("libgdk-3.so.0"); \
|
||||
lib->priv.w.neededlibs[1] = strdup("libpangocairo-1.0.so.0");
|
||||
|
||||
#define CUSTOM_FINI \
|
||||
freeGtk3My(lib->priv.w.p2); \
|
||||
free(lib->priv.w.p2);
|
||||
|
||||
#include "wrappedlib_init.h"
|
||||
Executable
+3977
File diff suppressed because it is too large.
Load diff
@@ -25,20 +25,31 @@ static char* libname = NULL;
|
||||
|
||||
typedef int (*iFv_t)(void);
|
||||
typedef void* (*pFi_t)(int);
|
||||
typedef void (*vFp_t)(void*);
|
||||
typedef int (*iFp_t)(void*);
|
||||
typedef void* (*pFp_t)(void*);
|
||||
typedef double (*dFp_t)(void*);
|
||||
typedef int (*iFip_t)(int, void*);
|
||||
typedef int (*iFpp_t)(void*, void*);
|
||||
typedef void* (*pFpp_t)(void*, void*);
|
||||
typedef void* (*pFpi_t)(void*, int);
|
||||
typedef void (*vFpp_t)(void*, void*);
|
||||
typedef void* (*pFppi_t)(void*, void*, int32_t);
|
||||
typedef int32_t (*iFppp_t)(void*, void*, void*);
|
||||
typedef uint32_t (*uFupp_t)(uint32_t, void*, void*);
|
||||
typedef void (*vFppp_t)(void*, void*, void*);
|
||||
typedef uint32_t (*uFupp_t)(uint32_t, void*, void*);
|
||||
typedef void (*vFpipV_t)(void*, int, void*, ...);
|
||||
typedef int (*iFpppp_t)(void*, void*, void*, void*);
|
||||
typedef void (*vFpppp_t)(void*, void*, void*, void*);
|
||||
typedef void (*vFppup_t)(void*, void*, uint32_t, void*);
|
||||
typedef unsigned long (*LFppppi_t)(void*, void*, void*, void*, int);
|
||||
typedef void (*vFpippp_t)(void*, int, void*, void*, void*);
|
||||
typedef void (*vFppppp_t)(void*, void*, void*, void*, void*);
|
||||
typedef void (*vFpuipp_t)(void*, uint32_t, int, void*, void*);
|
||||
typedef void (*vFppupp_t)(void*, void*, uint32_t, void*, void*);
|
||||
typedef unsigned long (*LFpppppi_t)(void*, void*, void*, void*, void*, int);
|
||||
typedef int (*iFpppppp_t)(void*, void*, void*, void*, void*, void*);
|
||||
typedef void (*vFpuipuV_t)(void*, uint32_t, int, void*, uint32_t, ...);
|
||||
typedef int (*iFppuppp_t)(void*, void*, uint32_t, void*, void*, void*);
|
||||
typedef void* (*pFppppppi_t)(void*, void*, void*, void*, void*, void*, int);
|
||||
typedef void* (*pFppppppp_t)(void*, void*, void*, void*, void*, void*, void*);
|
||||
@@ -56,11 +67,15 @@ typedef void* (*pFpipppppppi_t)(void*, int, void*, void*, void*, void*,
|
||||
GO(gtk_widget_get_type, iFv_t) \
|
||||
GO(gtk_button_get_type, iFv_t) \
|
||||
GO(gtk_container_get_type, iFv_t) \
|
||||
GO(gtk_misc_get_type, iFv_t) \
|
||||
GO(gtk_label_get_type, iFv_t) \
|
||||
GO(gtk_tree_view_get_type, iFv_t) \
|
||||
GO(gtk_type_class, pFi_t) \
|
||||
GO(gtk_button_get_label, pFp_t) \
|
||||
GO(gtk_signal_connect_full, LFppppppii_t) \
|
||||
GO(gtk_dialog_add_button, pFppi_t) \
|
||||
GO(gtk_message_dialog_format_secondary_text, vFpp_t)\
|
||||
GO(gtk_message_dialog_format_secondary_text, vFpp_t) \
|
||||
GO(gtk_message_dialog_format_secondary_markup, vFpp_t) \
|
||||
GO(gtk_init, vFpp_t) \
|
||||
GO(gtk_init_check, iFpp_t) \
|
||||
GO(gtk_init_with_args, iFpppppp_t) \
|
||||
@@ -86,6 +101,26 @@ typedef void* (*pFpipppppppi_t)(void*, int, void*, void*, void*, void*,
|
||||
GO(gtk_type_unique, iFip_t) \
|
||||
GO(gtk_spin_button_get_value, dFp_t) \
|
||||
GO(gtk_builder_connect_signals_full, vFppp_t) \
|
||||
GO(gtk_action_get_type, iFv_t) \
|
||||
GO(gtk_binding_entry_add_signall, vFpuipp_t)\
|
||||
GO(gtk_binding_entry_add_signal, vFpuipuV_t)\
|
||||
GO(gtk_container_foreach, vFppp_t) \
|
||||
GO(gtk_cell_layout_set_cell_data_func, vFppppp_t) \
|
||||
GO(g_module_close, iFp_t) \
|
||||
GO(g_module_open, pFpi_t) \
|
||||
GO(g_module_supported, iFv_t) \
|
||||
GO(g_module_symbol, iFppp_t) \
|
||||
GO(g_log, vFpipV_t) \
|
||||
GO(g_type_class_ref, pFi_t) \
|
||||
GO(g_type_class_unref, vFp_t) \
|
||||
GO(g_signal_connect_object, LFppppi_t) \
|
||||
GO(g_signal_connect_data, LFpppppi_t) \
|
||||
GO(gtk_action_group_add_actions, vFppup_t) \
|
||||
GO(gtk_action_group_add_actions_full, vFppupp_t) \
|
||||
GO(gtk_tree_model_foreach, vFppp_t) \
|
||||
GO(gtk_clipboard_request_text, vFppp_t) \
|
||||
GO(gtk_clipboard_request_contents, vFpppp_t)\
|
||||
|
||||
|
||||
|
||||
typedef struct gtkx112_my_s {
|
||||
@@ -129,11 +164,48 @@ EXPORT uintptr_t my_gtk_signal_connect_full(x86emu_t* emu, void* object, void* n
|
||||
return ret;
|
||||
}
|
||||
|
||||
// this is quite ineficient, but GCallback is often used, so create a large pool here...
|
||||
#define SUPER() \
|
||||
GO(0) \
|
||||
GO(1) \
|
||||
GO(2) \
|
||||
GO(3)
|
||||
GO(3) \
|
||||
GO(4) \
|
||||
GO(5) \
|
||||
GO(6) \
|
||||
GO(7) \
|
||||
GO(8) \
|
||||
GO(9) \
|
||||
GO(10) \
|
||||
GO(11) \
|
||||
GO(12) \
|
||||
GO(13) \
|
||||
GO(14) \
|
||||
GO(15) \
|
||||
GO(16) \
|
||||
GO(17) \
|
||||
GO(18) \
|
||||
GO(19) \
|
||||
GO(20) \
|
||||
GO(21) \
|
||||
GO(22) \
|
||||
GO(23) \
|
||||
GO(24) \
|
||||
GO(25) \
|
||||
GO(26) \
|
||||
GO(27) \
|
||||
GO(28) \
|
||||
GO(29) \
|
||||
GO(30) \
|
||||
GO(31) \
|
||||
GO(32) \
|
||||
GO(33) \
|
||||
GO(34) \
|
||||
GO(35) \
|
||||
GO(36) \
|
||||
GO(37) \
|
||||
GO(38) \
|
||||
GO(39) \
|
||||
|
||||
// GtkMenuDetachFunc
|
||||
#define GO(A) \
|
||||
@@ -342,6 +414,121 @@ static void* findBuilderConnectFct(void* fct)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkCellLayoutDataFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GtkCellLayoutDataFunc_fct_##A = 0; \
|
||||
static void my_GtkCellLayoutDataFunc_##A(void* layout, void* cell, void* tree, void* iter, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_GtkCellLayoutDataFunc_fct_##A, 5, layout, cell, tree, iter, data);\
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGtkCellLayoutDataFuncFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_GtkCellLayoutDataFunc_fct_##A == (uintptr_t)fct) return my_GtkCellLayoutDataFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_GtkCellLayoutDataFunc_fct_##A == 0) {my_GtkCellLayoutDataFunc_fct_##A = (uintptr_t)fct; return my_GtkCellLayoutDataFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkCellLayoutDataFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GDestroyNotify
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GDestroyNotify_fct_##A = 0; \
|
||||
static void my_GDestroyNotify_##A(void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_GDestroyNotify_fct_##A, 1, data); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGDestroyNotifyFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_GDestroyNotify_fct_##A == (uintptr_t)fct) return my_GDestroyNotify_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_GDestroyNotify_fct_##A == 0) {my_GDestroyNotify_fct_##A = (uintptr_t)fct; return my_GDestroyNotify_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GDestroyNotify callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkTreeModelForeachFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GtkTreeModelForeachFunc_fct_##A = 0; \
|
||||
static int my_GtkTreeModelForeachFunc_##A(void* model, void* path, void* iter, void* data) \
|
||||
{ \
|
||||
return (int)RunFunction(my_context, my_GtkTreeModelForeachFunc_fct_##A, 4, model, path, iter, data); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGtkTreeModelForeachFuncFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_GtkTreeModelForeachFunc_fct_##A == (uintptr_t)fct) return my_GtkTreeModelForeachFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_GtkTreeModelForeachFunc_fct_##A == 0) {my_GtkTreeModelForeachFunc_fct_##A = (uintptr_t)fct; return my_GtkTreeModelForeachFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkTreeModelForeachFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkClipboardReceivedFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GtkClipboardReceivedFunc_fct_##A = 0; \
|
||||
static void my_GtkClipboardReceivedFunc_##A(void* clipboard, void* sel, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_GtkClipboardReceivedFunc_fct_##A, 3, clipboard, sel, data); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGtkClipboardReceivedFuncFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_GtkClipboardReceivedFunc_fct_##A == (uintptr_t)fct) return my_GtkClipboardReceivedFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_GtkClipboardReceivedFunc_fct_##A == 0) {my_GtkClipboardReceivedFunc_fct_##A = (uintptr_t)fct; return my_GtkClipboardReceivedFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkClipboardReceivedFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// GtkClipboardTextReceivedFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_GtkClipboardTextReceivedFunc_fct_##A = 0; \
|
||||
static void my_GtkClipboardTextReceivedFunc_##A(void* clipboard, void* text, void* data) \
|
||||
{ \
|
||||
RunFunction(my_context, my_GtkClipboardTextReceivedFunc_fct_##A, 3, clipboard, text, data); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* findGtkClipboardTextReceivedFuncFct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_GtkClipboardTextReceivedFunc_fct_##A == (uintptr_t)fct) return my_GtkClipboardTextReceivedFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_GtkClipboardTextReceivedFunc_fct_##A == 0) {my_GtkClipboardTextReceivedFunc_fct_##A = (uintptr_t)fct; return my_GtkClipboardTextReceivedFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GtkClipboardTextReceivedFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#undef SUPER
|
||||
|
||||
EXPORT void my_gtk_dialog_add_buttons(x86emu_t* emu, void* dialog, void* first, uintptr_t* b)
|
||||
@@ -376,6 +563,24 @@ EXPORT void my_gtk_message_dialog_format_secondary_text(x86emu_t* emu, void* dia
|
||||
free(buf);
|
||||
}
|
||||
|
||||
EXPORT void my_gtk_message_dialog_format_secondary_markup(x86emu_t* emu, void* dialog, void* fmt, void* b)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
char* buf = NULL;
|
||||
#ifndef NOALIGN
|
||||
myStackAlign((const char*)fmt, b, emu->scratch);
|
||||
iFppp_t f = (iFppp_t)vasprintf;
|
||||
f(&buf, fmt, emu->scratch);
|
||||
#else
|
||||
iFppp_t f = (iFppp_t)vasprintf;
|
||||
f(&buf, fmt, b);
|
||||
#endif
|
||||
// pre-bake the fmt/vaarg, because there is no "va_list" version of this function
|
||||
my->gtk_message_dialog_format_secondary_markup(dialog, buf);
|
||||
free(buf);
|
||||
}
|
||||
EXPORT void* my_gtk_type_class(x86emu_t* emu, int type)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
@@ -392,6 +597,7 @@ EXPORT void my_gtk_init(x86emu_t* emu, void* argc, void* argv)
|
||||
|
||||
my->gtk_init(argc, argv);
|
||||
my_checkGlobalGdkDisplay();
|
||||
AutoBridgeGtk(my->g_type_class_ref, my->g_type_class_unref);
|
||||
}
|
||||
|
||||
EXPORT int my_gtk_init_check(x86emu_t* emu, void* argc, void* argv)
|
||||
@@ -401,6 +607,7 @@ EXPORT int my_gtk_init_check(x86emu_t* emu, void* argc, void* argv)
|
||||
|
||||
int ret = my->gtk_init_check(argc, argv);
|
||||
my_checkGlobalGdkDisplay();
|
||||
AutoBridgeGtk(my->g_type_class_ref, my->g_type_class_unref);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -411,6 +618,7 @@ EXPORT int my_gtk_init_with_args(x86emu_t* emu, void* argc, void* argv, void* pa
|
||||
|
||||
int ret = my->gtk_init_with_args(argc, argv, param, entries, trans, error);
|
||||
my_checkGlobalGdkDisplay();
|
||||
AutoBridgeGtk(my->g_type_class_ref, my->g_type_class_unref);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -706,13 +914,180 @@ EXPORT void my_gtk_builder_connect_signals_full(x86emu_t* emu, void* builder, vo
|
||||
my->gtk_builder_connect_signals_full(builder, findBuilderConnectFct(f), data);
|
||||
}
|
||||
|
||||
typedef struct my_GSList_s {
|
||||
void* data;
|
||||
struct my_GSList_s *next;
|
||||
} my_GSList_t;
|
||||
|
||||
EXPORT void my_gtk_binding_entry_add_signal(x86emu_t* emu, void* binding, uint32_t keyval, int mod, void* name, uint32_t n, void** st)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
if(!n) {
|
||||
my->gtk_binding_entry_add_signal(binding, keyval, mod, name, 0);
|
||||
return;
|
||||
}
|
||||
// build the list
|
||||
my_GSList_t *list = calloc(n, sizeof(my_GSList_t));
|
||||
for(uint32_t i=0; i<n; ++i) {
|
||||
list[i].data = st[i];
|
||||
list[i].next = (i==(n-1))?NULL:&list[i+1];
|
||||
}
|
||||
|
||||
my->gtk_binding_entry_add_signall(binding, keyval, mod, name, list);
|
||||
|
||||
free(list);
|
||||
}
|
||||
|
||||
EXPORT void my_gtk_container_foreach(x86emu_t* emu, void* container, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_container_foreach(container, findGtkCallbackFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void my_gtk_cell_layout_set_cell_data_func(x86emu_t* emu, void* layout, void* cell, void* f, void* data, void* notify)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_cell_layout_set_cell_data_func(layout, cell, findGtkCellLayoutDataFuncFct(f), data, findGDestroyNotifyFct(notify));
|
||||
}
|
||||
|
||||
typedef struct my_ConnectArgs_s
|
||||
{
|
||||
gtkx112_my_t *my;
|
||||
x86emu_t* emu;
|
||||
void* module;
|
||||
void* data;
|
||||
} my_ConnectArgs_t;
|
||||
// defined in wrappedgobject2.c
|
||||
uintptr_t my_g_signal_connect_data(x86emu_t* emu, void* instance, void* detailed, void* c_handler, void* data, void* closure, uint32_t flags);
|
||||
|
||||
static void my_gtk_builder_connect_signals_custom(void* builder,
|
||||
void* object,
|
||||
char* signal_name,
|
||||
char* handler_name,
|
||||
void* connect_object,
|
||||
int flags,
|
||||
my_ConnectArgs_t* args)
|
||||
{
|
||||
/* Only error out for missing GModule support if we've not
|
||||
* found the symbols explicitly added with gtk_builder_add_callback_symbol()
|
||||
*/
|
||||
void* func = NULL;
|
||||
printf_log(LOG_DEBUG, "signal \"%s\" from \"%s\" connection, connect_object=%p\n", signal_name, handler_name, connect_object);
|
||||
|
||||
uintptr_t offs = 0;
|
||||
uintptr_t end = 0;
|
||||
GetGlobalSymbolStartEnd(my_context->maplib, handler_name, &offs, &end);
|
||||
if(!offs) {
|
||||
if (args->module == NULL)
|
||||
args->my->g_log("Gtk", 1<<2 ,"gtk_builder_connect_signals() requires working GModule");
|
||||
if (!args->my->g_module_symbol(args->module, handler_name, (void*)&func))
|
||||
{
|
||||
args->my->g_log("Gtk", 1<<4, "Could not find signal handler '%s'. Did you compile with -rdynamic?", handler_name);
|
||||
return;
|
||||
}
|
||||
if (connect_object)
|
||||
args->my->g_signal_connect_object(object, signal_name, func, connect_object, flags);
|
||||
else
|
||||
args->my->g_signal_connect_data(object, signal_name, func, args->data, NULL, flags);
|
||||
} else {
|
||||
if(connect_object) {
|
||||
printf_log(LOG_NONE, "Error: connect custom signal to object unsupported\n");
|
||||
} else
|
||||
my_g_signal_connect_data(args->emu, object, signal_name, (void*)offs, args->data, NULL, flags);
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT void my_gtk_builder_connect_signals(x86emu_t* emu, void* builder, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
my_ConnectArgs_t args;
|
||||
|
||||
args.my = my;
|
||||
args.emu = emu;
|
||||
args.data = data;
|
||||
if (my->g_module_supported())
|
||||
args.module = my->g_module_open(NULL, 1);
|
||||
my->gtk_builder_connect_signals_full(builder, my_gtk_builder_connect_signals_custom, &args);
|
||||
if (args.module)
|
||||
my->g_module_close(args.module);
|
||||
}
|
||||
|
||||
typedef struct my_GtkActionEntry_s {
|
||||
const char* name;
|
||||
const char* stock_id;
|
||||
const char* label;
|
||||
const char* accelerator;
|
||||
const char* tooltip;
|
||||
void* callback;
|
||||
} my_GtkActionEntry_t;
|
||||
|
||||
EXPORT void my_gtk_action_group_add_actions(x86emu_t* emu, void* action_group, my_GtkActionEntry_t* entries, uint32_t n, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
my_GtkActionEntry_t myentries[n];
|
||||
memcpy(myentries, entries, n*sizeof(my_GtkActionEntry_t));
|
||||
for(uint32_t i=0; i<n; ++i)
|
||||
myentries[i].callback = findGtkCallbackFct(entries[i].callback);
|
||||
my->gtk_action_group_add_actions(action_group, myentries, n, data);
|
||||
}
|
||||
|
||||
EXPORT void my_gtk_action_group_add_actions_full(x86emu_t* emu, void* action_group, my_GtkActionEntry_t* entries, uint32_t n, void* data, void* destroy)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
my_GtkActionEntry_t myentries[n];
|
||||
memcpy(myentries, entries, n*sizeof(my_GtkActionEntry_t));
|
||||
for(uint32_t i=0; i<n; ++i)
|
||||
myentries[i].callback = findGtkCallbackFct(entries[i].callback);
|
||||
my->gtk_action_group_add_actions_full(action_group, myentries, n, data, findGDestroyNotifyFct(destroy));
|
||||
}
|
||||
|
||||
EXPORT void my_gtk_tree_model_foreach(x86emu_t* emu, void* model, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_tree_model_foreach(model, findGtkTreeModelForeachFuncFct(f), data);
|
||||
}
|
||||
|
||||
EXPORT void my_gtk_clipboard_request_contents(x86emu_t* emu, void* clipboard, void* target, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_clipboard_request_contents(clipboard, target, findGtkClipboardReceivedFuncFct(f), data);
|
||||
}
|
||||
|
||||
|
||||
EXPORT void my_gtk_clipboard_request_text(x86emu_t* emu, void* clipboard, void* f, void* data)
|
||||
{
|
||||
library_t * lib = GetLibInternal(libname);
|
||||
gtkx112_my_t *my = (gtkx112_my_t*)lib->priv.w.p2;
|
||||
|
||||
my->gtk_clipboard_request_text(clipboard, findGtkClipboardTextReceivedFuncFct(f), data);
|
||||
}
|
||||
|
||||
#define CUSTOM_INIT \
|
||||
libname = lib->name; \
|
||||
lib->priv.w.p2 = getGtkx112My(lib); \
|
||||
SetGTKObjectID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_object_get_type()); \
|
||||
SetGTKWidgetID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_widget_get_type()); \
|
||||
SetGTKContainerID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_container_get_type()); \
|
||||
lib->priv.w.needed = 2; \
|
||||
SetGtkObjectID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_object_get_type()); \
|
||||
SetGtkWidgetID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_widget_get_type()); \
|
||||
SetGtkContainerID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_container_get_type()); \
|
||||
SetGtkActionID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_action_get_type()); \
|
||||
SetGtkMiscID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_misc_get_type()); \
|
||||
SetGtkLabelID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_label_get_type()); \
|
||||
SetGtkTreeViewID(((gtkx112_my_t*)lib->priv.w.p2)->gtk_tree_view_get_type());\
|
||||
lib->priv.w.needed = 2; \
|
||||
lib->priv.w.neededlibs = (char**)calloc(lib->priv.w.needed, sizeof(char*)); \
|
||||
lib->priv.w.neededlibs[0] = strdup("libgdk-x11-2.0.so.0"); \
|
||||
lib->priv.w.neededlibs[1] = strdup("libpangocairo-1.0.so.0");
|
||||
|
||||
@@ -85,74 +85,74 @@ GO(gtk_accel_map_get_type, iFv)
|
||||
GO(gtk_accessible_get_type, iFv)
|
||||
//GO(gtk_accessible_get_widget,
|
||||
//GO(gtk_accessible_set_widget,
|
||||
//GO(gtk_action_activate,
|
||||
//GO(gtk_action_block_activate,
|
||||
//GO(gtk_action_block_activate_from,
|
||||
//GO(gtk_action_connect_accelerator,
|
||||
//GO(gtk_action_connect_proxy,
|
||||
//GO(gtk_action_create_icon,
|
||||
//GO(gtk_action_create_menu,
|
||||
//GO(gtk_action_create_menu_item,
|
||||
//GO(gtk_action_create_tool_item,
|
||||
//GO(gtk_action_disconnect_accelerator,
|
||||
//GO(gtk_action_disconnect_proxy,
|
||||
//GO(gtk_action_get_accel_closure,
|
||||
//GO(gtk_action_get_accel_path,
|
||||
//GO(gtk_action_get_always_show_image,
|
||||
//GO(gtk_action_get_gicon,
|
||||
//GO(gtk_action_get_icon_name,
|
||||
//GO(gtk_action_get_is_important,
|
||||
//GO(gtk_action_get_label,
|
||||
//GO(gtk_action_get_name,
|
||||
//GO(gtk_action_get_proxies,
|
||||
//GO(gtk_action_get_sensitive,
|
||||
//GO(gtk_action_get_short_label,
|
||||
//GO(gtk_action_get_stock_id,
|
||||
//GO(gtk_action_get_tooltip,
|
||||
GO(gtk_action_activate, vFp)
|
||||
GO(gtk_action_block_activate, vFp)
|
||||
GO(gtk_action_block_activate_from, vFpp)
|
||||
GO(gtk_action_connect_accelerator, vFp)
|
||||
GO(gtk_action_connect_proxy, vFpp)
|
||||
GO(gtk_action_create_icon, pFpi)
|
||||
GO(gtk_action_create_menu, pFp)
|
||||
GO(gtk_action_create_menu_item, pFp)
|
||||
GO(gtk_action_create_tool_item, pFp)
|
||||
GO(gtk_action_disconnect_accelerator, vFp)
|
||||
GO(gtk_action_disconnect_proxy, vFpp)
|
||||
GO(gtk_action_get_accel_closure, pFp)
|
||||
GO(gtk_action_get_accel_path, pFp)
|
||||
GO(gtk_action_get_always_show_image, iFp)
|
||||
GO(gtk_action_get_gicon, pFp)
|
||||
GO(gtk_action_get_icon_name, pFp)
|
||||
GO(gtk_action_get_is_important, iFp)
|
||||
GO(gtk_action_get_label, pFp)
|
||||
GO(gtk_action_get_name, pFp)
|
||||
GO(gtk_action_get_proxies, pFp)
|
||||
GO(gtk_action_get_sensitive, iFp)
|
||||
GO(gtk_action_get_short_label, pFp)
|
||||
GO(gtk_action_get_stock_id, pFp)
|
||||
GO(gtk_action_get_tooltip, pFp)
|
||||
GO(gtk_action_get_type, iFv)
|
||||
//GO(gtk_action_get_visible,
|
||||
//GO(gtk_action_get_visible_horizontal,
|
||||
//GO(gtk_action_get_visible_vertical,
|
||||
//GO(gtk_action_group_add_action,
|
||||
//GO(gtk_action_group_add_actions,
|
||||
//GO(gtk_action_group_add_actions_full,
|
||||
//GO(gtk_action_group_add_action_with_accel,
|
||||
//GO(gtk_action_group_add_radio_actions,
|
||||
//GO(gtk_action_group_add_radio_actions_full,
|
||||
//GO(gtk_action_group_add_toggle_actions,
|
||||
//GO(gtk_action_group_add_toggle_actions_full,
|
||||
//GO(gtk_action_group_get_action,
|
||||
//GO(gtk_action_group_get_name,
|
||||
//GO(gtk_action_group_get_sensitive,
|
||||
GO(gtk_action_get_visible, iFp)
|
||||
GO(gtk_action_get_visible_horizontal, iFp)
|
||||
GO(gtk_action_get_visible_vertical, iFp)
|
||||
GO(gtk_action_group_add_action, vFpp)
|
||||
GOM(gtk_action_group_add_actions, vFEppup)
|
||||
GOM(gtk_action_group_add_actions_full, vFEppupp)
|
||||
GO(gtk_action_group_add_action_with_accel, vFppp)
|
||||
//GOM(gtk_action_group_add_radio_actions, vFppuiBp)
|
||||
//GOM(gtk_action_group_add_radio_actions_full, vFppuiBpB)
|
||||
GO(gtk_action_group_add_toggle_actions, vFppup)
|
||||
//GOM(gtk_action_group_add_toggle_actions_full, vFEppupB)
|
||||
GO(gtk_action_group_get_action, pFpp)
|
||||
GO(gtk_action_group_get_name, pFp)
|
||||
GO(gtk_action_group_get_sensitive, iFp)
|
||||
GO(gtk_action_group_get_type, iFv)
|
||||
//GO(gtk_action_group_get_visible,
|
||||
//GO(gtk_action_group_list_actions,
|
||||
//GO(gtk_action_group_new,
|
||||
//GO(gtk_action_group_remove_action,
|
||||
//GO(gtk_action_group_set_sensitive,
|
||||
//GO(gtk_action_group_set_translate_func,
|
||||
//GO(gtk_action_group_set_translation_domain,
|
||||
//GO(gtk_action_group_set_visible,
|
||||
//GO(gtk_action_group_translate_string,
|
||||
//GO(gtk_action_is_sensitive,
|
||||
//GO(gtk_action_is_visible,
|
||||
//GO(gtk_action_new,
|
||||
//GO(gtk_action_set_accel_group,
|
||||
//GO(gtk_action_set_accel_path,
|
||||
//GO(gtk_action_set_always_show_image,
|
||||
//GO(gtk_action_set_gicon,
|
||||
//GO(gtk_action_set_icon_name,
|
||||
//GO(gtk_action_set_is_important,
|
||||
//GO(gtk_action_set_label,
|
||||
//GO(gtk_action_set_sensitive,
|
||||
//GO(gtk_action_set_short_label,
|
||||
//GO(gtk_action_set_stock_id,
|
||||
//GO(gtk_action_set_tooltip,
|
||||
//GO(gtk_action_set_visible,
|
||||
//GO(gtk_action_set_visible_horizontal,
|
||||
//GO(gtk_action_set_visible_vertical,
|
||||
//GO(gtk_action_unblock_activate,
|
||||
//GO(gtk_action_unblock_activate_from,
|
||||
GO(gtk_action_group_get_visible, iFp)
|
||||
GO(gtk_action_group_list_actions, pFp)
|
||||
GO(gtk_action_group_new, pFp)
|
||||
GO(gtk_action_group_remove_action, vFpp)
|
||||
GO(gtk_action_group_set_sensitive, vFpi)
|
||||
//GOM(gtk_action_group_set_translate_func, vFEpBpB)
|
||||
GO(gtk_action_group_set_translation_domain, vFpp)
|
||||
GO(gtk_action_group_set_visible, vFpi)
|
||||
GO(gtk_action_group_translate_string, pFpp)
|
||||
GO(gtk_action_is_sensitive, iFp)
|
||||
GO(gtk_action_is_visible, iFp)
|
||||
GO(gtk_action_new, pFpppp)
|
||||
GO(gtk_action_set_accel_group, vFpp)
|
||||
GO(gtk_action_set_accel_path, vFpp)
|
||||
GO(gtk_action_set_always_show_image, vFpi)
|
||||
GO(gtk_action_set_gicon, vFpp)
|
||||
GO(gtk_action_set_icon_name, vFpp)
|
||||
GO(gtk_action_set_is_important, vFpi)
|
||||
GO(gtk_action_set_label, vFpp)
|
||||
GO(gtk_action_set_sensitive, vFpi)
|
||||
GO(gtk_action_set_short_label, vFpp)
|
||||
GO(gtk_action_set_stock_id, vFpp)
|
||||
GO(gtk_action_set_tooltip, vFpp)
|
||||
GO(gtk_action_set_visible, vFpi)
|
||||
GO(gtk_action_set_visible_horizontal, vFpi)
|
||||
GO(gtk_action_set_visible_vertical, vFpi)
|
||||
GO(gtk_action_unblock_activate, vFp)
|
||||
GO(gtk_action_unblock_activate_from, vFpp)
|
||||
//GO(gtk_activatable_do_set_related_action,
|
||||
//GO(gtk_activatable_get_related_action,
|
||||
GO(gtk_activatable_get_type, iFv)
|
||||
@@ -220,19 +220,19 @@ GO(gtk_assistant_page_type_get_type, iFv)
|
||||
//GO(gtk_assistant_set_page_type,
|
||||
//GO(gtk_assistant_update_buttons_state,
|
||||
GO(gtk_attach_options_get_type, iFv)
|
||||
//GO(gtk_binding_entry_add_signal,
|
||||
//GO(gtk_binding_entry_add_signall,
|
||||
//GO(gtk_binding_entry_clear,
|
||||
//GO(gtk_binding_entry_remove,
|
||||
//GO(gtk_binding_entry_skip,
|
||||
//GO(gtk_binding_parse_binding,
|
||||
//GO(gtk_bindings_activate,
|
||||
//GO(gtk_bindings_activate_event,
|
||||
//GO(gtk_binding_set_activate,
|
||||
//GO(gtk_binding_set_add_path,
|
||||
//GO(gtk_binding_set_by_class,
|
||||
//GO(gtk_binding_set_find,
|
||||
//GO(gtk_binding_set_new,
|
||||
GOM(gtk_binding_entry_add_signal, vFEpuipuV) //vaarg
|
||||
GO(gtk_binding_entry_add_signall, vFpuipp)
|
||||
GO(gtk_binding_entry_clear, vFpui)
|
||||
GO(gtk_binding_entry_remove, vFpui)
|
||||
GO(gtk_binding_entry_skip, vFpui)
|
||||
GO(gtk_binding_parse_binding, uFp)
|
||||
GO(gtk_bindings_activate, iFpui)
|
||||
GO(gtk_bindings_activate_event, iFpp)
|
||||
GO(gtk_binding_set_activate, iFpuip)
|
||||
GO(gtk_binding_set_add_path, vFpipi)
|
||||
GO(gtk_binding_set_by_class, pFp)
|
||||
GO(gtk_binding_set_find, pFp)
|
||||
GO(gtk_binding_set_new, pFp)
|
||||
GO(gtk_bin_get_child, pFp)
|
||||
GO(gtk_bin_get_type, iFv)
|
||||
GO(gtk_border_copy, pFp)
|
||||
@@ -260,13 +260,13 @@ GO(gtk_buildable_get_internal_child, pFppp)
|
||||
GO(gtk_buildable_get_name, pFp)
|
||||
GO(gtk_buildable_get_type, iFv)
|
||||
GO(gtk_buildable_parser_finished, vFpp)
|
||||
GO(gtk_buildable_set_buildable_property, vFpppp)
|
||||
GO(gtk_buildable_set_buildable_property, vFpppG)
|
||||
GO(gtk_buildable_set_name, vFpp)
|
||||
GO(gtk_builder_add_from_file, uFppp)
|
||||
GO(gtk_builder_add_from_string, iFppLp)
|
||||
GO(gtk_builder_add_objects_from_file, uFpppp)
|
||||
GO(gtk_builder_add_objects_from_string, uFppLpp)
|
||||
GO(gtk_builder_connect_signals, vFpp)
|
||||
GOM(gtk_builder_connect_signals, vFEpp)
|
||||
GOM(gtk_builder_connect_signals_full, vFEppp)
|
||||
GO(gtk_builder_error_get_type, iFv)
|
||||
GO(gtk_builder_error_quark, pFv)
|
||||
@@ -277,8 +277,8 @@ GO(gtk_builder_get_type, iFv)
|
||||
GO(gtk_builder_get_type_from_name, iFpp)
|
||||
GO(gtk_builder_new, pFv)
|
||||
GO(gtk_builder_set_translation_domain, vFpp)
|
||||
GO(gtk_builder_value_from_string, iFppppp)
|
||||
GO(gtk_builder_value_from_string_type, iFpippp)
|
||||
GO(gtk_builder_value_from_string, iFpppGp)
|
||||
GO(gtk_builder_value_from_string_type, iFpipGp)
|
||||
GO(gtk_button_action_get_type, iFv)
|
||||
GO(gtk_button_box_get_child_ipadding, vFppp)
|
||||
GO(gtk_button_box_get_child_secondary, iFpp)
|
||||
@@ -350,39 +350,39 @@ GO(gtk_cell_layout_pack_end, vFppi)
|
||||
GO(gtk_cell_layout_pack_start, vFppi)
|
||||
GO(gtk_cell_layout_reorder, vFppi)
|
||||
GO(gtk_cell_layout_set_attributes, vFpppppppppp) // vaarg
|
||||
//GOM(gtk_cell_layout_set_cell_data_func, vFEppppp)
|
||||
GOM(gtk_cell_layout_set_cell_data_func, vFEppppp)
|
||||
GO(gtk_cell_renderer_accel_get_type, iFv)
|
||||
GO(gtk_cell_renderer_accel_mode_get_type, iFv)
|
||||
//GO(gtk_cell_renderer_accel_new,
|
||||
//GO(gtk_cell_renderer_activate,
|
||||
GO(gtk_cell_renderer_accel_new, pFv)
|
||||
GO(gtk_cell_renderer_activate, iFppppppi)
|
||||
GO(gtk_cell_renderer_combo_get_type, iFv)
|
||||
//GO(gtk_cell_renderer_combo_new,
|
||||
//GO(gtk_cell_renderer_editing_canceled,
|
||||
//GO(gtk_cell_renderer_get_alignment,
|
||||
//GO(gtk_cell_renderer_get_fixed_size,
|
||||
//GO(gtk_cell_renderer_get_padding,
|
||||
//GO(gtk_cell_renderer_get_sensitive,
|
||||
//GO(gtk_cell_renderer_get_size,
|
||||
GO(gtk_cell_renderer_combo_new, pFv)
|
||||
GO(gtk_cell_renderer_editing_canceled, vFp)
|
||||
GO(gtk_cell_renderer_get_alignment, vFppp)
|
||||
GO(gtk_cell_renderer_get_fixed_size, vFppp)
|
||||
GO(gtk_cell_renderer_get_padding, vFppp)
|
||||
GO(gtk_cell_renderer_get_sensitive, iFp)
|
||||
GO(gtk_cell_renderer_get_size, vFppppppp)
|
||||
GO(gtk_cell_renderer_get_type, iFv)
|
||||
//GO(gtk_cell_renderer_get_visible,
|
||||
GO(gtk_cell_renderer_get_visible, iFp)
|
||||
GO(gtk_cell_renderer_mode_get_type, iFv)
|
||||
GO(gtk_cell_renderer_pixbuf_get_type, iFv)
|
||||
//GO(gtk_cell_renderer_pixbuf_new,
|
||||
GO(gtk_cell_renderer_pixbuf_new, pFv)
|
||||
GO(gtk_cell_renderer_progress_get_type, iFv)
|
||||
//GO(gtk_cell_renderer_progress_new,
|
||||
//GO(gtk_cell_renderer_render,
|
||||
//GO(gtk_cell_renderer_set_alignment,
|
||||
//GO(gtk_cell_renderer_set_fixed_size,
|
||||
//GO(gtk_cell_renderer_set_padding,
|
||||
//GO(gtk_cell_renderer_set_sensitive,
|
||||
//GO(gtk_cell_renderer_set_visible,
|
||||
GO(gtk_cell_renderer_progress_new, pFv)
|
||||
GO(gtk_cell_renderer_render, vFppppppi)
|
||||
GO(gtk_cell_renderer_set_alignment, vFpff)
|
||||
GO(gtk_cell_renderer_set_fixed_size, vFpii)
|
||||
GO(gtk_cell_renderer_set_padding, vFpii)
|
||||
GO(gtk_cell_renderer_set_sensitive, vFpi)
|
||||
GO(gtk_cell_renderer_set_visible, vFpi)
|
||||
GO(gtk_cell_renderer_spin_get_type, iFv)
|
||||
GO(gtk_cell_renderer_spinner_get_type, iFv)
|
||||
//GO(gtk_cell_renderer_spinner_new,
|
||||
//GO(gtk_cell_renderer_spin_new,
|
||||
//GO(gtk_cell_renderer_start_editing,
|
||||
GO(gtk_cell_renderer_spinner_new, pFv)
|
||||
GO(gtk_cell_renderer_spin_new, pFv)
|
||||
GO(gtk_cell_renderer_start_editing, pFppppppi)
|
||||
GO(gtk_cell_renderer_state_get_type, iFv)
|
||||
//GO(gtk_cell_renderer_stop_editing,
|
||||
GO(gtk_cell_renderer_stop_editing, vFpi)
|
||||
GO(gtk_cell_renderer_text_get_type, iFv)
|
||||
GO(gtk_cell_renderer_text_new, pFv)
|
||||
GO(gtk_cell_renderer_text_set_fixed_height_from_font, vFpi)
|
||||
@@ -430,11 +430,11 @@ GO(gtk_clipboard_get_display, pFp)
|
||||
GO(gtk_clipboard_get_for_display, pFpp)
|
||||
GO(gtk_clipboard_get_owner, pFp)
|
||||
GO(gtk_clipboard_get_type, iFv)
|
||||
//GOM(gtk_clipboard_request_contents, vFEpppp)
|
||||
GOM(gtk_clipboard_request_contents, vFEpppp)
|
||||
//GOM(gtk_clipboard_request_image, vFEppp)
|
||||
//GOM(gtk_clipboard_request_rich_text, vFEpppp)
|
||||
//GOM(gtk_clipboard_request_targets, vFEppp)
|
||||
//GOM(gtk_clipboard_request_text, vFEppp)
|
||||
GOM(gtk_clipboard_request_text, vFEppp)
|
||||
//GOM(gtk_clipboard_request_uris, vFEppp)
|
||||
GO(gtk_clipboard_set_can_store, vFppp)
|
||||
GO(gtk_clipboard_set_image, vFpp)
|
||||
@@ -630,17 +630,17 @@ GO(gtk_container_add, vFpp)
|
||||
GO(gtk_container_add_with_properties, vFpppppppppppp) //vaarg
|
||||
GO(gtk_container_check_resize, vFp)
|
||||
GO2(gtk_container_child_get, vFpppV, gtk_container_child_get_valist)
|
||||
GO(gtk_container_child_get_property, vFpppp)
|
||||
GO(gtk_container_child_get_property, vFpppG)
|
||||
GO(gtk_container_child_get_valist, vFpppp)
|
||||
GO2(gtk_container_child_set, vFpppV, gtk_container_child_set_valist)
|
||||
GO(gtk_container_child_set_property, vFpppp)
|
||||
GO(gtk_container_child_set_property, vFpppG)
|
||||
GO(gtk_container_child_set_valist, vFpppp)
|
||||
GO(gtk_container_child_type, iFp)
|
||||
GO(gtk_container_class_find_child_property, pFpp)
|
||||
GO(gtk_container_class_install_child_property, vFpup)
|
||||
GO(gtk_container_class_list_child_properties, pFpp)
|
||||
GOM(gtk_container_forall, vFEppp)
|
||||
//GOM(gtk_container_foreach, vFEppp)
|
||||
GOM(gtk_container_foreach, vFEppp)
|
||||
//GOM(gtk_container_foreach_full, vFEppppp)
|
||||
GO(gtk_container_get_border_width, uFp)
|
||||
GO(gtk_container_get_children, pFp)
|
||||
@@ -1567,7 +1567,7 @@ GO(gtk_list_store_insert, vFppi)
|
||||
GO(gtk_list_store_insert_after, vFppp)
|
||||
GO(gtk_list_store_insert_before, vFppp)
|
||||
//GOM(gtk_list_store_insert_with_values, vFppiV) // wrap with gtk_list_store_insert_with_valuesv
|
||||
GO(gtk_list_store_insert_with_valuesv, vFppippi)
|
||||
GO(gtk_list_store_insert_with_valuesv, vFppippi) //TODO: check if GValues need alignement
|
||||
GO(gtk_list_store_iter_is_valid, iFpp)
|
||||
GO(gtk_list_store_move_after, vFppp)
|
||||
GO(gtk_list_store_move_before, vFppp)
|
||||
@@ -1579,8 +1579,8 @@ GO(gtk_list_store_reorder, vFpp)
|
||||
GO2(gtk_list_store_set, vFppV, gtk_list_store_set_valist)
|
||||
GO(gtk_list_store_set_column_types, vFpip)
|
||||
GO(gtk_list_store_set_valist, vFppp)
|
||||
GO(gtk_list_store_set_value, vFppip)
|
||||
GO(gtk_list_store_set_valuesv, vFppppi)
|
||||
GO(gtk_list_store_set_value, vFppiG)
|
||||
GO(gtk_list_store_set_valuesv, vFppppi) //TODO: check if GValues need alignement
|
||||
GO(gtk_list_store_swap, vFppp)
|
||||
GO(gtk_list_toggle_add_mode, vFp)
|
||||
GO(gtk_list_toggle_focus_row, vFp)
|
||||
@@ -1659,7 +1659,7 @@ GO(gtk_menu_item_set_accel_path, vFpp)
|
||||
GO(gtk_menu_item_set_label, vFpp)
|
||||
GO(gtk_menu_item_set_right_justified, vFpi)
|
||||
GO(gtk_menu_item_set_submenu, vFpp)
|
||||
GO(gtk_menu_item_set_use_underline, iFp)
|
||||
GO(gtk_menu_item_set_use_underline, vFpi)
|
||||
GO(gtk_menu_item_toggle_size_allocate, vFpi)
|
||||
GO(gtk_menu_item_toggle_size_request, vFpp)
|
||||
GO(gtk_menu_new, pFv)
|
||||
@@ -1687,23 +1687,23 @@ GO(gtk_menu_shell_prepend, vFpp)
|
||||
GO(gtk_menu_shell_select_first, vFpi)
|
||||
GO(gtk_menu_shell_select_item, vFpp)
|
||||
//GO(gtk_menu_shell_set_take_focus,
|
||||
//GO(gtk_menu_tool_button_get_menu,
|
||||
GO(gtk_menu_tool_button_get_menu, pFp)
|
||||
GO(gtk_menu_tool_button_get_type, iFv)
|
||||
//GO(gtk_menu_tool_button_new,
|
||||
//GO(gtk_menu_tool_button_new_from_stock,
|
||||
//GO(gtk_menu_tool_button_set_arrow_tooltip,
|
||||
//GO(gtk_menu_tool_button_set_arrow_tooltip_markup,
|
||||
//GO(gtk_menu_tool_button_set_arrow_tooltip_text,
|
||||
//GO(gtk_menu_tool_button_set_menu,
|
||||
//GO(gtk_message_dialog_format_secondary_markup,
|
||||
GO(gtk_menu_tool_button_new, pFpp)
|
||||
GO(gtk_menu_tool_button_new_from_stock, pFp)
|
||||
GO(gtk_menu_tool_button_set_arrow_tooltip, vFpppp)
|
||||
GO(gtk_menu_tool_button_set_arrow_tooltip_markup, vFpp)
|
||||
GO(gtk_menu_tool_button_set_arrow_tooltip_text, vFpp)
|
||||
GO(gtk_menu_tool_button_set_menu, vFpp)
|
||||
GOM(gtk_message_dialog_format_secondary_markup, vFEppV)
|
||||
GOM(gtk_message_dialog_format_secondary_text, vFEppV)
|
||||
//GO(gtk_message_dialog_get_image,
|
||||
//GO(gtk_message_dialog_get_message_area,
|
||||
GO(gtk_message_dialog_get_image, pFp)
|
||||
GO(gtk_message_dialog_get_message_area, pFp)
|
||||
GO(gtk_message_dialog_get_type, iFv)
|
||||
GO(gtk_message_dialog_new, pFpuiippppppppppp) // vaarg :(
|
||||
//GO(gtk_message_dialog_new_with_markup,
|
||||
//GO(gtk_message_dialog_set_image,
|
||||
//GO(gtk_message_dialog_set_markup,
|
||||
GO(gtk_message_dialog_new_with_markup, pFpuiippppppppppp) // vaarg
|
||||
GO(gtk_message_dialog_set_image, vFpp)
|
||||
GO(gtk_message_dialog_set_markup, vFpp)
|
||||
GO(gtk_message_type_get_type, iFv)
|
||||
GO(gtk_metric_type_get_type, iFv)
|
||||
GO(gtk_misc_get_alignment, vFppp)
|
||||
@@ -1711,13 +1711,13 @@ GO(gtk_misc_get_padding, vFppp)
|
||||
GO(gtk_misc_get_type, iFv)
|
||||
GO(gtk_misc_set_alignment, vFpff)
|
||||
GO(gtk_misc_set_padding, vFpii)
|
||||
//GO(gtk_mount_operation_get_parent,
|
||||
//GO(gtk_mount_operation_get_screen,
|
||||
GO(gtk_mount_operation_get_parent, pFp)
|
||||
GO(gtk_mount_operation_get_screen, pFp)
|
||||
GO(gtk_mount_operation_get_type, iFv)
|
||||
//GO(gtk_mount_operation_is_showing,
|
||||
//GO(gtk_mount_operation_new,
|
||||
//GO(gtk_mount_operation_set_parent,
|
||||
//GO(gtk_mount_operation_set_screen,
|
||||
GO(gtk_mount_operation_is_showing, iFp)
|
||||
GO(gtk_mount_operation_new, pFp)
|
||||
GO(gtk_mount_operation_set_parent, vFpp)
|
||||
GO(gtk_mount_operation_set_screen, vFpp)
|
||||
GO(gtk_movement_step_get_type, iFv)
|
||||
GO(gtk_notebook_append_page, iFppp)
|
||||
GO(gtk_notebook_append_page_menu, iFpppp)
|
||||
@@ -2309,11 +2309,11 @@ GO(gtk_rc_parse_color_full, uFppp)
|
||||
GO(gtk_rc_parse_priority, iFpp)
|
||||
GO(gtk_rc_parse_state, uFpp)
|
||||
GO(gtk_rc_parse_string, vFp)
|
||||
GO(gtk_rc_property_parse_border, iFppp)
|
||||
GO(gtk_rc_property_parse_color, iFppp)
|
||||
GO(gtk_rc_property_parse_enum, iFppp)
|
||||
GO(gtk_rc_property_parse_flags, iFppp)
|
||||
GO(gtk_rc_property_parse_requisition, iFppp)
|
||||
GO(gtk_rc_property_parse_border, iFppG)
|
||||
GO(gtk_rc_property_parse_color, iFppG)
|
||||
GO(gtk_rc_property_parse_enum, iFppG)
|
||||
GO(gtk_rc_property_parse_flags, iFppG)
|
||||
GO(gtk_rc_property_parse_requisition, iFppG)
|
||||
GO(gtk_rc_reparse_all, iFv)
|
||||
GO(gtk_rc_reparse_all_for_settings, iFpi)
|
||||
GO(gtk_rc_reset_styles, vFp)
|
||||
@@ -2377,61 +2377,61 @@ GO(gtk_recent_chooser_menu_get_type, iFv)
|
||||
GO(gtk_recent_chooser_widget_get_type, iFv)
|
||||
//GO(gtk_recent_chooser_widget_new,
|
||||
//GO(gtk_recent_chooser_widget_new_for_manager,
|
||||
//GO(gtk_recent_filter_add_age,
|
||||
//GO(gtk_recent_filter_add_application,
|
||||
//GO(gtk_recent_filter_add_custom,
|
||||
//GO(gtk_recent_filter_add_group,
|
||||
//GO(gtk_recent_filter_add_mime_type,
|
||||
//GO(gtk_recent_filter_add_pattern,
|
||||
//GO(gtk_recent_filter_add_pixbuf_formats,
|
||||
//GO(gtk_recent_filter_filter,
|
||||
GO(gtk_recent_filter_add_age, vFpi)
|
||||
GO(gtk_recent_filter_add_application, vFpp)
|
||||
//GOM(gtk_recent_filter_add_custom, vFEpippp)
|
||||
GO(gtk_recent_filter_add_group, vFpp)
|
||||
GO(gtk_recent_filter_add_mime_type, vFpp)
|
||||
GO(gtk_recent_filter_add_pattern, vFpp)
|
||||
GO(gtk_recent_filter_add_pixbuf_formats, vFp)
|
||||
GO(gtk_recent_filter_filter, iFpp)
|
||||
GO(gtk_recent_filter_flags_get_type, iFv)
|
||||
//GO(gtk_recent_filter_get_name,
|
||||
//GO(gtk_recent_filter_get_needed,
|
||||
GO(gtk_recent_filter_get_name, pFp)
|
||||
GO(gtk_recent_filter_get_needed, iFp)
|
||||
GO(gtk_recent_filter_get_type, iFv)
|
||||
//GO(gtk_recent_filter_new,
|
||||
//GO(gtk_recent_filter_set_name,
|
||||
//GO(gtk_recent_info_exists,
|
||||
//GO(gtk_recent_info_get_added,
|
||||
//GO(gtk_recent_info_get_age,
|
||||
//GO(gtk_recent_info_get_application_info,
|
||||
//GO(gtk_recent_info_get_applications,
|
||||
//GO(gtk_recent_info_get_description,
|
||||
//GO(gtk_recent_info_get_display_name,
|
||||
//GO(gtk_recent_info_get_groups,
|
||||
//GO(gtk_recent_info_get_icon,
|
||||
//GO(gtk_recent_info_get_mime_type,
|
||||
//GO(gtk_recent_info_get_modified,
|
||||
//GO(gtk_recent_info_get_private_hint,
|
||||
//GO(gtk_recent_info_get_short_name,
|
||||
GO(gtk_recent_filter_new, pFv)
|
||||
GO(gtk_recent_filter_set_name, vFpp)
|
||||
GO(gtk_recent_info_exists, iFp)
|
||||
GO(gtk_recent_info_get_added, uFp)
|
||||
GO(gtk_recent_info_get_age, iFp)
|
||||
GO(gtk_recent_info_get_application_info, iFppppp)
|
||||
GO(gtk_recent_info_get_applications, pFpp)
|
||||
GO(gtk_recent_info_get_description, pFp)
|
||||
GO(gtk_recent_info_get_display_name, pFp)
|
||||
GO(gtk_recent_info_get_groups, pFpp)
|
||||
GO(gtk_recent_info_get_icon, pFpi)
|
||||
GO(gtk_recent_info_get_mime_type, pFp)
|
||||
GO(gtk_recent_info_get_modified, lFp)
|
||||
GO(gtk_recent_info_get_private_hint, iFp)
|
||||
GO(gtk_recent_info_get_short_name, pFp)
|
||||
GO(gtk_recent_info_get_type, iFv)
|
||||
//GO(gtk_recent_info_get_uri,
|
||||
//GO(gtk_recent_info_get_uri_display,
|
||||
//GO(gtk_recent_info_get_visited,
|
||||
//GO(gtk_recent_info_has_application,
|
||||
//GO(gtk_recent_info_has_group,
|
||||
//GO(gtk_recent_info_is_local,
|
||||
//GO(gtk_recent_info_last_application,
|
||||
//GO(gtk_recent_info_match,
|
||||
//GO(gtk_recent_info_ref,
|
||||
//GO(gtk_recent_info_unref,
|
||||
//GO(gtk_recent_manager_add_full,
|
||||
//GO(gtk_recent_manager_add_item,
|
||||
GO(gtk_recent_info_get_uri, pFp)
|
||||
GO(gtk_recent_info_get_uri_display, pFp)
|
||||
GO(gtk_recent_info_get_visited, lFp)
|
||||
GO(gtk_recent_info_has_application, iFpp)
|
||||
GO(gtk_recent_info_has_group, iFpp)
|
||||
GO(gtk_recent_info_is_local, iFp)
|
||||
GO(gtk_recent_info_last_application, pFp)
|
||||
GO(gtk_recent_info_match, iFpp)
|
||||
GO(gtk_recent_info_ref, pFp)
|
||||
GO(gtk_recent_info_unref, vFp)
|
||||
GO(gtk_recent_manager_add_full, iFppp)
|
||||
GO(gtk_recent_manager_add_item, iFpp)
|
||||
GO(gtk_recent_manager_error_get_type, iFv)
|
||||
//GO(gtk_recent_manager_error_quark,
|
||||
//GO(gtk_recent_manager_get_default,
|
||||
//GO(gtk_recent_manager_get_for_screen,
|
||||
//GO(gtk_recent_manager_get_items,
|
||||
//GO(gtk_recent_manager_get_limit,
|
||||
GO(gtk_recent_manager_error_quark, pFv)
|
||||
GO(gtk_recent_manager_get_default, pFv)
|
||||
GO(gtk_recent_manager_get_for_screen, pFp)
|
||||
GO(gtk_recent_manager_get_items, pFp)
|
||||
GO(gtk_recent_manager_get_limit, iFp)
|
||||
GO(gtk_recent_manager_get_type, iFv)
|
||||
//GO(gtk_recent_manager_has_item,
|
||||
//GO(gtk_recent_manager_lookup_item,
|
||||
//GO(gtk_recent_manager_move_item,
|
||||
//GO(gtk_recent_manager_new,
|
||||
//GO(gtk_recent_manager_purge_items,
|
||||
//GO(gtk_recent_manager_remove_item,
|
||||
//GO(gtk_recent_manager_set_limit,
|
||||
//GO(gtk_recent_manager_set_screen,
|
||||
GO(gtk_recent_manager_has_item, iFpp)
|
||||
GO(gtk_recent_manager_lookup_item, pFppp)
|
||||
GO(gtk_recent_manager_move_item, iFpppp)
|
||||
GO(gtk_recent_manager_new, pFv)
|
||||
GO(gtk_recent_manager_purge_items, iFpp)
|
||||
GO(gtk_recent_manager_remove_item, iFppp)
|
||||
GO(gtk_recent_manager_set_limit, vFpi)
|
||||
GO(gtk_recent_manager_set_screen, vFpp)
|
||||
GO(gtk_recent_sort_type_get_type, iFv)
|
||||
GO(gtk_relief_style_get_type, iFv)
|
||||
GO(gtk_requisition_copy, pFp)
|
||||
@@ -2471,7 +2471,7 @@ GO(gtk_scale_get_type, iFv)
|
||||
//GO(gtk_scale_set_draw_value,
|
||||
//GO(gtk_scale_set_value_pos,
|
||||
GO(gtk_scrollbar_get_type, iFv)
|
||||
//GO(gtk_scrolled_window_add_with_viewport,
|
||||
GO(gtk_scrolled_window_add_with_viewport, vFpp)
|
||||
GO(gtk_scrolled_window_get_hadjustment, pFp)
|
||||
GO(gtk_scrolled_window_get_hscrollbar, pFp)
|
||||
GO(gtk_scrolled_window_get_placement, iFp)
|
||||
@@ -2536,11 +2536,11 @@ GO(gtk_settings_install_property, vFp)
|
||||
//GOM(gtk_settings_install_property_parser, vFEpB)
|
||||
GO(gtk_settings_set_double_property, vFppdp)
|
||||
GO(gtk_settings_set_long_property, vFpplp)
|
||||
GO(gtk_settings_set_property_value, vFppp)
|
||||
GO(gtk_settings_set_property_value, vFppp) //TODO: GtkSettingsValue needs alignment too!
|
||||
GO(gtk_settings_set_string_property, vFpppp)
|
||||
GO(gtk_shadow_type_get_type, iFv)
|
||||
//GO(gtk_show_about_dialog,
|
||||
//GO(gtk_show_uri,
|
||||
GO(gtk_show_uri, iFppup)
|
||||
GO(gtk_side_type_get_type, iFv)
|
||||
//GO(gtk_signal_compat_matched,
|
||||
GOM(gtk_signal_connect_full, LFEppppppii)
|
||||
@@ -2664,7 +2664,7 @@ GO(gtk_style_copy, pFp)
|
||||
GO(gtk_style_detach, vFp)
|
||||
GO(gtk_style_get, vFpippppppppppp) //vaarg, wrap with gtk_style_get_valist?
|
||||
GO(gtk_style_get_font, pFp)
|
||||
GO(gtk_style_get_style_property, vFpipp)
|
||||
GO(gtk_style_get_style_property, vFpipG)
|
||||
GO(gtk_style_get_type, iFv)
|
||||
GO(gtk_style_get_valist, vFpipp)
|
||||
GO(gtk_style_lookup_color, iFppp)
|
||||
@@ -3284,7 +3284,7 @@ GO(gtk_tree_model_filter_get_type, iFv)
|
||||
//GO(gtk_tree_model_filter_set_visible_column,
|
||||
//GO(gtk_tree_model_filter_set_visible_func,
|
||||
GO(gtk_tree_model_flags_get_type, iFv)
|
||||
//GOM(gtk_tree_model_foreach, vFEpBp)
|
||||
GOM(gtk_tree_model_foreach, vFEppp)
|
||||
GO2(gtk_tree_model_get, vFppV, gtk_tree_model_get_valist)
|
||||
GO(gtk_tree_model_get_column_type, iFpi)
|
||||
GO(gtk_tree_model_get_flags, iFp)
|
||||
@@ -3296,7 +3296,7 @@ GO(gtk_tree_model_get_path, pFpp)
|
||||
GO(gtk_tree_model_get_string_from_iter, pFpp)
|
||||
GO(gtk_tree_model_get_type, iFv)
|
||||
GO(gtk_tree_model_get_valist, vFppp)
|
||||
GO(gtk_tree_model_get_value, vFppip)
|
||||
GO(gtk_tree_model_get_value, vFppiG)
|
||||
GO(gtk_tree_model_iter_children, iFppp)
|
||||
GO(gtk_tree_model_iter_has_child, iFpp)
|
||||
GO(gtk_tree_model_iter_n_children, iFpp)
|
||||
@@ -3389,30 +3389,30 @@ GOM(gtk_tree_sortable_set_default_sort_func, vFEpppp)
|
||||
GO(gtk_tree_sortable_set_sort_column_id, vFpii)
|
||||
GOM(gtk_tree_sortable_set_sort_func, vFEpippp)
|
||||
GO(gtk_tree_sortable_sort_column_changed, vFp)
|
||||
//GO(gtk_tree_store_append,
|
||||
//GO(gtk_tree_store_clear,
|
||||
GO(gtk_tree_store_append, vFppp)
|
||||
GO(gtk_tree_store_clear, vFp)
|
||||
GO(gtk_tree_store_get_type, iFv)
|
||||
//GO(gtk_tree_store_insert,
|
||||
//GO(gtk_tree_store_insert_after,
|
||||
//GO(gtk_tree_store_insert_before,
|
||||
//GO(gtk_tree_store_insert_with_values,
|
||||
//GO(gtk_tree_store_insert_with_valuesv,
|
||||
//GO(gtk_tree_store_is_ancestor,
|
||||
//GO(gtk_tree_store_iter_depth,
|
||||
//GO(gtk_tree_store_iter_is_valid,
|
||||
//GO(gtk_tree_store_move_after,
|
||||
//GO(gtk_tree_store_move_before,
|
||||
//GO(gtk_tree_store_new,
|
||||
//GO(gtk_tree_store_newv,
|
||||
//GO(gtk_tree_store_prepend,
|
||||
//GO(gtk_tree_store_remove,
|
||||
//GO(gtk_tree_store_reorder,
|
||||
//GO(gtk_tree_store_set,
|
||||
//GO(gtk_tree_store_set_column_types,
|
||||
//GO(gtk_tree_store_set_valist,
|
||||
//GO(gtk_tree_store_set_value,
|
||||
//GO(gtk_tree_store_set_valuesv,
|
||||
//GO(gtk_tree_store_swap,
|
||||
GO(gtk_tree_store_insert, vFpppi)
|
||||
GO(gtk_tree_store_insert_after, vFpppp)
|
||||
GO(gtk_tree_store_insert_before, vFpppp)
|
||||
//GO(gtk_tree_store_insert_with_values, vFEpppiV)
|
||||
GO(gtk_tree_store_insert_with_valuesv, vFpppippi) // TODO: Check if GValues need alignments?
|
||||
GO(gtk_tree_store_is_ancestor, iFppp)
|
||||
GO(gtk_tree_store_iter_depth, iFpp)
|
||||
GO(gtk_tree_store_iter_is_valid, iFpp)
|
||||
GO(gtk_tree_store_move_after, vFppp)
|
||||
GO(gtk_tree_store_move_before, vFppp)
|
||||
GO2(gtk_tree_store_new, pFuV, gtk_tree_store_newv)
|
||||
GO(gtk_tree_store_newv, pFup)
|
||||
GO(gtk_tree_store_prepend, vFppp)
|
||||
GO(gtk_tree_store_remove, iFpp)
|
||||
GO(gtk_tree_store_reorder, vFppp)
|
||||
GO2(gtk_tree_store_set, vFppV, gtk_tree_store_set_valist)
|
||||
GO(gtk_tree_store_set_column_types, vFpup)
|
||||
GO(gtk_tree_store_set_valist, vFppp)
|
||||
GO(gtk_tree_store_set_value, vFppiG)
|
||||
GO(gtk_tree_store_set_valuesv, vFppppi) // TODO: Check if GValues need alignments?
|
||||
GO(gtk_tree_store_swap, vFppp)
|
||||
//GO(gtk_tree_unselect_child,
|
||||
//GO(gtk_tree_unselect_item,
|
||||
GO(gtk_tree_view_append_column, iFpp)
|
||||
@@ -3580,25 +3580,25 @@ GO(gtk_type_flags_get_values, pFi)
|
||||
GO(gtk_type_init, vFi)
|
||||
GO(gtk_type_new, pFi)
|
||||
GOM(gtk_type_unique, iFEpp)
|
||||
//GO(gtk_ui_manager_add_ui,
|
||||
//GO(gtk_ui_manager_add_ui_from_file,
|
||||
//GO(gtk_ui_manager_add_ui_from_string,
|
||||
//GO(gtk_ui_manager_ensure_update,
|
||||
//GO(gtk_ui_manager_get_accel_group,
|
||||
//GO(gtk_ui_manager_get_action,
|
||||
//GO(gtk_ui_manager_get_action_groups,
|
||||
//GO(gtk_ui_manager_get_add_tearoffs,
|
||||
//GO(gtk_ui_manager_get_toplevels,
|
||||
GO(gtk_ui_manager_add_ui, vFpipppii)
|
||||
GO(gtk_ui_manager_add_ui_from_file, uFppp)
|
||||
GO(gtk_ui_manager_add_ui_from_string, uFppLp)
|
||||
GO(gtk_ui_manager_ensure_update, vFp)
|
||||
GO(gtk_ui_manager_get_accel_group, pFp)
|
||||
GO(gtk_ui_manager_get_action, pFpp)
|
||||
GO(gtk_ui_manager_get_action_groups, pFp)
|
||||
GO(gtk_ui_manager_get_add_tearoffs, iFp)
|
||||
GO(gtk_ui_manager_get_toplevels, pFpi)
|
||||
GO(gtk_ui_manager_get_type, iFv)
|
||||
//GO(gtk_ui_manager_get_ui,
|
||||
//GO(gtk_ui_manager_get_widget,
|
||||
//GO(gtk_ui_manager_insert_action_group,
|
||||
GO(gtk_ui_manager_get_ui, pFp)
|
||||
GO(gtk_ui_manager_get_widget, pFpp)
|
||||
GO(gtk_ui_manager_insert_action_group, vFppi)
|
||||
GO(gtk_ui_manager_item_type_get_type, iFv)
|
||||
//GO(gtk_ui_manager_new,
|
||||
//GO(gtk_ui_manager_new_merge_id,
|
||||
//GO(gtk_ui_manager_remove_action_group,
|
||||
//GO(gtk_ui_manager_remove_ui,
|
||||
//GO(gtk_ui_manager_set_add_tearoffs,
|
||||
GO(gtk_ui_manager_new, pFv)
|
||||
GO(gtk_ui_manager_new_merge_id, uFp)
|
||||
GO(gtk_ui_manager_remove_action_group, vFpp)
|
||||
GO(gtk_ui_manager_remove_ui, vFpu)
|
||||
GO(gtk_ui_manager_set_add_tearoffs, vFpi)
|
||||
GO(gtk_unit_get_type, iFv)
|
||||
GO(gtk_update_type_get_type, iFv)
|
||||
GO(gtk_vbox_get_type, iFv)
|
||||
@@ -3609,16 +3609,16 @@ GO(gtk_vbutton_box_get_type, iFv)
|
||||
//GO(gtk_vbutton_box_new,
|
||||
//GO(gtk_vbutton_box_set_layout_default,
|
||||
//GO(gtk_vbutton_box_set_spacing_default,
|
||||
//GO(gtk_viewport_get_bin_window,
|
||||
//GO(gtk_viewport_get_hadjustment,
|
||||
//GO(gtk_viewport_get_shadow_type,
|
||||
GO(gtk_viewport_get_bin_window, pFp)
|
||||
GO(gtk_viewport_get_hadjustment, pFp)
|
||||
GO(gtk_viewport_get_shadow_type, iFp)
|
||||
GO(gtk_viewport_get_type, iFv)
|
||||
//GO(gtk_viewport_get_vadjustment,
|
||||
//GO(gtk_viewport_get_view_window,
|
||||
//GO(gtk_viewport_new,
|
||||
//GO(gtk_viewport_set_hadjustment,
|
||||
//GO(gtk_viewport_set_shadow_type,
|
||||
//GO(gtk_viewport_set_vadjustment,
|
||||
GO(gtk_viewport_get_vadjustment, pFp)
|
||||
GO(gtk_viewport_get_view_window, pFp)
|
||||
GO(gtk_viewport_new, pFpp)
|
||||
GO(gtk_viewport_set_hadjustment, vFpp)
|
||||
GO(gtk_viewport_set_shadow_type, vFpi)
|
||||
GO(gtk_viewport_set_vadjustment, vFpp)
|
||||
GO(gtk_visibility_get_type, iFv)
|
||||
GO(gtk_volume_button_get_type, iFv)
|
||||
GO(gtk_volume_button_new, pFv)
|
||||
@@ -3804,7 +3804,7 @@ GO(gtk_widget_size_allocate, vFpppuii)
|
||||
GO(gtk_widget_size_request, vFpp)
|
||||
GO(gtk_widget_style_attach, vFp)
|
||||
GO2(gtk_widget_style_get, vFppV, gtk_widget_style_get_valist)
|
||||
GO(gtk_widget_style_get_property, vFppp)
|
||||
GO(gtk_widget_style_get_property, vFppG)
|
||||
GO(gtk_widget_style_get_valist, vFppp)
|
||||
GO(gtk_widget_thaw_child_notify, vFp)
|
||||
GO(gtk_widget_translate_coordinates, iFppiipp)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <setjmp.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <spawn.h>
|
||||
|
||||
#include "wrappedlibs.h"
|
||||
|
||||
@@ -514,15 +515,16 @@ pid_t EXPORT my_fork(x86emu_t* emu)
|
||||
v = fork();
|
||||
if(type == EMUTYPE_MAIN)
|
||||
thread_set_emu(emu);
|
||||
if(v==EAGAIN || v==ENOMEM) {
|
||||
if(v<0) {
|
||||
printf_log(LOG_NONE, "BOX86: Warning, fork errored... (%d)\n", v);
|
||||
// error...
|
||||
} else if(v!=0) {
|
||||
} else if(v>0) {
|
||||
// execute atforks parent functions
|
||||
for (int i=0; i<my_context->atfork_sz; --i)
|
||||
if(my_context->atforks[i].parent)
|
||||
RunFunctionWithEmu(emu, 0, my_context->atforks[i].parent, 0);
|
||||
|
||||
} else if(v==0) {
|
||||
} else /*if(v==0)*/ {
|
||||
// execute atforks child functions
|
||||
for (int i=0; i<my_context->atfork_sz; --i)
|
||||
if(my_context->atforks[i].child)
|
||||
@@ -1846,7 +1848,7 @@ EXPORT int32_t my_execvp(x86emu_t* emu, const char* path, char* const argv[])
|
||||
newargv[j+1] = argv[j];
|
||||
if(self) newargv[1] = emu->context->fullpath;
|
||||
printf_log(LOG_DEBUG, " => execvp(\"%s\", %p [\"%s\", \"%s\"...:%d])\n", newargv[0], newargv, newargv[1], i?newargv[2]:"", i);
|
||||
int ret = execvp(newargv[0], argv);
|
||||
int ret = execvp(newargv[0], newargv);
|
||||
free(newargv);
|
||||
return ret;
|
||||
}
|
||||
@@ -1856,6 +1858,36 @@ EXPORT int32_t my_execvp(x86emu_t* emu, const char* path, char* const argv[])
|
||||
return execvp(path, argv);
|
||||
}
|
||||
|
||||
// execvp should use PATH to search for the program first
|
||||
EXPORT int32_t my_posix_spawnp(x86emu_t* emu, pid_t* pid, const char* path,
|
||||
const posix_spawn_file_actions_t *actions, const posix_spawnattr_t* attrp, char* const argv[], char* const envp[])
|
||||
{
|
||||
// need to use BOX86_PATH / PATH here...
|
||||
char* fullpath = ResolveFile(path, &my_context->box86_path);
|
||||
// use fullpath...
|
||||
int self = isProcSelf(fullpath, "exe");
|
||||
int x86 = FileIsX86ELF(fullpath);
|
||||
printf_log(LOG_DEBUG, "posix_spawnp(%p, \"%s\", %p, %p, %p, %p), IsX86=%d / fullpath=\"%s\"\n", pid, path, actions, attrp, argv, envp, x86, fullpath);
|
||||
free(fullpath);
|
||||
if ((x86 || self)) {
|
||||
// count argv...
|
||||
int i=0;
|
||||
while(argv[i]) ++i;
|
||||
char** newargv = (char**)calloc(i+2, sizeof(char*));
|
||||
newargv[0] = emu->context->box86path;
|
||||
for (int j=0; j<i; ++j)
|
||||
newargv[j+1] = argv[j];
|
||||
if(self) newargv[1] = emu->context->fullpath;
|
||||
printf_log(LOG_DEBUG, " => posix_spawnp(%p, \"%s\", %p, %p, %p [\"%s\", \"%s\"...:%d], %p)\n", pid, newargv[0], actions, attrp, newargv, newargv[1], i?newargv[2]:"", i, envp);
|
||||
int ret = posix_spawnp(pid, newargv[0], actions, attrp, newargv, envp);
|
||||
printf_log(LOG_DEBUG, "posix_spawnp returned %d\n", ret);
|
||||
//free(newargv);
|
||||
return ret;
|
||||
}
|
||||
// fullpath is gone, so the search will only be on PATH, not on BOX86_PATH (is that an issue?)
|
||||
return posix_spawnp(pid, path, actions, attrp, argv, envp);
|
||||
}
|
||||
|
||||
EXPORT void my__Jv_RegisterClasses() {}
|
||||
|
||||
EXPORT int32_t my___cxa_thread_atexit_impl(x86emu_t* emu, void* dtor, void* obj, void* dso)
|
||||
|
||||
@@ -1264,7 +1264,7 @@ GO(posix_spawn_file_actions_adddup2, iFpii)
|
||||
GO(posix_spawn_file_actions_addopen, iFpipii)
|
||||
GO(posix_spawn_file_actions_destroy, iFp)
|
||||
GO(posix_spawn_file_actions_init, iFp)
|
||||
// posix_spawnp
|
||||
GOM(posix_spawnp, iFEpppppp)
|
||||
GO(ppoll, iFpupp)
|
||||
GOW(prctl, iFiuuuu)
|
||||
GOW(pread, lFipLl)
|
||||
|
||||
@@ -157,11 +157,11 @@ GO(pthread_setschedprio, iFpi)
|
||||
GO(__pthread_setspecific, iFup)
|
||||
GO(pthread_setspecific, iFup)
|
||||
GO(pthread_sigmask, iFipp)
|
||||
// pthread_spin_destroy
|
||||
// pthread_spin_init
|
||||
// pthread_spin_lock
|
||||
// pthread_spin_trylock
|
||||
// pthread_spin_unlock
|
||||
GO(pthread_spin_destroy, iFp)
|
||||
GO(pthread_spin_init, iFpi)
|
||||
GO(pthread_spin_lock, iFp)
|
||||
GO(pthread_spin_trylock, iFp)
|
||||
GO(pthread_spin_unlock, iFp)
|
||||
GO(pthread_testcancel, vFv)
|
||||
GO(pthread_timedjoin_np, iFppp)
|
||||
GO(pthread_tryjoin_np, iFpp)
|
||||
|
||||
@@ -579,7 +579,7 @@ GO(XkbFreeClientMap, vFpui)
|
||||
//GO(XkbFreeGeomShapes
|
||||
//GO(XkbFreeIndicatorMaps
|
||||
GO(XkbFreeKeyboard, vFpui)
|
||||
//GO(XkbFreeNames
|
||||
GO(XkbFreeNames, vFpui)
|
||||
// _XkbFreeReadBuffer
|
||||
//GO(XkbFreeServerMap
|
||||
DATA(_XkbGetAtomNameFunc, 4)
|
||||
@@ -611,7 +611,7 @@ GO(XkbGetMap, pFpuu)
|
||||
//GO(XkbGetNamedDeviceIndicator
|
||||
//GO(XkbGetNamedGeometry
|
||||
GO(XkbGetNamedIndicator, iFpuppppp)
|
||||
//GO(XkbGetNames
|
||||
GO(XkbGetNames, iFpup)
|
||||
//GO(XkbGetPerClientControls
|
||||
// _XkbGetReadBufferCountedString
|
||||
// _XkbGetReadBufferPtr
|
||||
|
||||
@@ -42,6 +42,12 @@ void* getMpg123My(library_t* lib)
|
||||
#undef GO
|
||||
return my;
|
||||
}
|
||||
|
||||
void freeMpg123My(void* lib)
|
||||
{
|
||||
//mpg123_my_t *my = (mpg123_my_t *)lib;
|
||||
}
|
||||
|
||||
#undef SUPER
|
||||
|
||||
#define SUPER() \
|
||||
@@ -120,11 +126,6 @@ static void* find_cleanup_Fct(void* fct)
|
||||
|
||||
#undef SUPER
|
||||
|
||||
void freeMpg123My(void* lib)
|
||||
{
|
||||
//mpg123_my_t *my = (mpg123_my_t *)lib;
|
||||
}
|
||||
|
||||
EXPORT int my_mpg123_replace_reader_handle(x86emu_t* emu, void* mh, void* r_read, void* r_lseek, void* cleanup)
|
||||
{
|
||||
library_t * lib = GetLibInternal(mpg123Name);
|
||||
|
||||
@@ -7,6 +7,7 @@ GO(pango_attr_background_new, pFWWW)
|
||||
GO(pango_attr_fallback_new, pFi)
|
||||
GO(pango_attr_family_new, pFp)
|
||||
GO(pango_attr_font_desc_new, pFp)
|
||||
GO(pango_attr_font_features_new, pFp) //since 1.38
|
||||
GO(pango_attr_foreground_new, pFWWW)
|
||||
GO(pango_attr_gravity_hint_new, pFi)
|
||||
GO(pango_attr_gravity_new, pFi)
|
||||
@@ -104,7 +105,7 @@ GO(pango_extents_to_pixels, vFpp)
|
||||
//GO(pango_find_base_dir,
|
||||
//GO(pango_find_map,
|
||||
//GO(pango_find_paragraph_boundary,
|
||||
//GO(pango_font_describe,
|
||||
GO(pango_font_describe, pFp)
|
||||
GO(pango_font_describe_with_absolute_size, pFp)
|
||||
GO(pango_font_description_better_match, iFppp)
|
||||
GO(pango_font_description_copy, pFp)
|
||||
|
||||
@@ -684,7 +684,7 @@ EXPORT void my_pa_mainloop_free(x86emu_t* emu, void* mainloop)
|
||||
pulse_my_t* my = lib->priv.w.p2;
|
||||
my->pa_mainloop_free(mainloop);
|
||||
mainloop_inited = 0;
|
||||
my_mainloop_ref = my_mainloop_orig = NULL;
|
||||
/*my_mainloop_ref =*/ my_mainloop_orig = NULL;
|
||||
}
|
||||
EXPORT void* my_pa_mainloop_get_api(x86emu_t* emu, void* mainloop)
|
||||
{
|
||||
@@ -701,7 +701,7 @@ EXPORT void my_pa_threaded_mainloop_free(x86emu_t* emu, void* mainloop)
|
||||
pulse_my_t* my = lib->priv.w.p2;
|
||||
my->pa_threaded_mainloop_free(mainloop);
|
||||
mainloop_inited = 0;
|
||||
my_mainloop_ref = my_mainloop_orig = NULL;
|
||||
/*my_mainloop_ref =*/ my_mainloop_orig = NULL;
|
||||
}
|
||||
EXPORT void* my_pa_threaded_mainloop_get_api(x86emu_t* emu, void* mainloop)
|
||||
{
|
||||
|
||||
+168
-92
@@ -18,39 +18,170 @@
|
||||
|
||||
typedef void* (*pFpi_t)(void*, int32_t);
|
||||
typedef void* (*pFp_t)(void*);
|
||||
typedef int (*iFip_t)(int, void*);
|
||||
typedef void* (*pFpii_t)(void*, int32_t, int32_t);
|
||||
typedef void (*vFp_t)(void*);
|
||||
typedef void (*vFpp_t)(void*, void*);
|
||||
typedef int (*iFippp_t)(int, void*, void*, void*);
|
||||
|
||||
#define SUPER() \
|
||||
GO(Mix_LoadMUSType_RW,pFpii_t) \
|
||||
GO(Mix_LoadMUS_RW,pFp_t) \
|
||||
GO(Mix_LoadWAV_RW,pFpi_t) \
|
||||
GO(Mix_SetPostMix,vFpp_t) \
|
||||
GO(Mix_ChannelFinished,vFp_t) \
|
||||
GO(Mix_HookMusic, vFpp_t) \
|
||||
GO(Mix_HookMusicFinished, vFp_t) \
|
||||
GO(Mix_RegisterEffect, iFippp_t) \
|
||||
GO(Mix_UnregisterEffect, iFip_t) \
|
||||
|
||||
typedef struct sdl1mixer_my_s {
|
||||
pFpii_t Mix_LoadMUSType_RW;
|
||||
pFp_t Mix_LoadMUS_RW;
|
||||
pFpi_t Mix_LoadWAV_RW;
|
||||
vFpp_t Mix_SetPostMix;
|
||||
vFp_t Mix_ChannelFinished;
|
||||
vFpp_t Mix_HookMusic;
|
||||
vFp_t Mix_HookMusicFinished;
|
||||
#define GO(A, B) B A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
|
||||
x86emu_t* PostCallback;
|
||||
x86emu_t* hookMusicCB;
|
||||
} sdl1mixer_my_t;
|
||||
|
||||
static x86emu_t* hookMusicFinitCB = NULL;
|
||||
|
||||
static void* getSDL1MixerMy(library_t* lib)
|
||||
{
|
||||
sdl1mixer_my_t* my = (sdl1mixer_my_t*)calloc(1, sizeof(sdl1mixer_my_t));
|
||||
#define GO(A, W) my->A = (W)dlsym(lib->priv.w.lib, #A);
|
||||
GO(Mix_LoadMUSType_RW,pFpii_t)
|
||||
GO(Mix_LoadMUS_RW,pFp_t)
|
||||
GO(Mix_LoadWAV_RW,pFpi_t)
|
||||
GO(Mix_SetPostMix,vFpp_t)
|
||||
GO(Mix_ChannelFinished,vFp_t)
|
||||
GO(Mix_HookMusic, vFpp_t)
|
||||
GO(Mix_HookMusicFinished, vFp_t)
|
||||
SUPER()
|
||||
#undef GO
|
||||
return my;
|
||||
}
|
||||
#undef SUPER
|
||||
|
||||
#define SUPER() \
|
||||
GO(0) \
|
||||
GO(1) \
|
||||
GO(2) \
|
||||
GO(3) \
|
||||
GO(4)
|
||||
|
||||
// EffectFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_EffectFunc_fct_##A = 0; \
|
||||
static void my_EffectFunc_##A(int chan, void *stream, int len, void *udata) \
|
||||
{ \
|
||||
RunFunction(my_context, my_EffectFunc_fct_##A, 4, chan, stream, len, udata); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_EffectFunc_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_EffectFunc_fct_##A == (uintptr_t)fct) return my_EffectFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_EffectFunc_fct_##A == 0) {my_EffectFunc_fct_##A = (uintptr_t)fct; return my_EffectFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer EffectFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// EffectDone
|
||||
#define GO(A) \
|
||||
static uintptr_t my_EffectDone_fct_##A = 0; \
|
||||
static void my_EffectDone_##A(int chan, void *udata) \
|
||||
{ \
|
||||
RunFunction(my_context, my_EffectDone_fct_##A, 2, chan, udata); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_EffectDone_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_EffectDone_fct_##A == (uintptr_t)fct) return my_EffectDone_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_EffectDone_fct_##A == 0) {my_EffectDone_fct_##A = (uintptr_t)fct; return my_EffectDone_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer EffectDone callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// MixFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_MixFunc_fct_##A = 0; \
|
||||
static void my_MixFunc_##A(void *udata, uint8_t *stream, int len) \
|
||||
{ \
|
||||
RunFunction(my_context, my_MixFunc_fct_##A, 3, udata, stream, len); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_MixFunc_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_MixFunc_fct_##A == (uintptr_t)fct) return my_MixFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_MixFunc_fct_##A == 0) {my_MixFunc_fct_##A = (uintptr_t)fct; return my_MixFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer MixFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// ChannelFinished
|
||||
#define GO(A) \
|
||||
static uintptr_t my_ChannelFinished_fct_##A = 0; \
|
||||
static void my_ChannelFinished_##A(int channel) \
|
||||
{ \
|
||||
RunFunction(my_context, my_ChannelFinished_fct_##A, 1, channel); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_ChannelFinished_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_ChannelFinished_fct_##A == (uintptr_t)fct) return my_ChannelFinished_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_ChannelFinished_fct_##A == 0) {my_ChannelFinished_fct_##A = (uintptr_t)fct; return my_ChannelFinished_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer ChannelFinished callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// MusicFinished
|
||||
#define GO(A) \
|
||||
static uintptr_t my_MusicFinished_fct_##A = 0; \
|
||||
static void my_MusicFinished_##A() \
|
||||
{ \
|
||||
RunFunction(my_context, my_MusicFinished_fct_##A, 0); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_MusicFinished_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_MusicFinished_fct_##A == (uintptr_t)fct) return my_MusicFinished_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_MusicFinished_fct_##A == 0) {my_MusicFinished_fct_##A = (uintptr_t)fct; return my_MusicFinished_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer MusicFinished callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#undef SUPER
|
||||
|
||||
static void freeSDL1MixerMy(library_t* lib)
|
||||
{
|
||||
@@ -61,7 +192,7 @@ static void freeSDL1MixerMy(library_t* lib)
|
||||
FreeCallback(my->hookMusicCB);
|
||||
}
|
||||
|
||||
void EXPORT *my_Mix_LoadMUSType_RW(x86emu_t* emu, void* a, int32_t b, int32_t c)
|
||||
EXPORT void* my_Mix_LoadMUSType_RW(x86emu_t* emu, void* a, int32_t b, int32_t c)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a);
|
||||
@@ -70,7 +201,7 @@ void EXPORT *my_Mix_LoadMUSType_RW(x86emu_t* emu, void* a, int32_t b, int32_t c)
|
||||
RWNativeEnd(rw);
|
||||
return r;
|
||||
}
|
||||
void EXPORT *my_Mix_LoadMUS_RW(x86emu_t* emu, void* a)
|
||||
EXPORT void* my_Mix_LoadMUS_RW(x86emu_t* emu, void* a)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a);
|
||||
@@ -78,7 +209,7 @@ void EXPORT *my_Mix_LoadMUS_RW(x86emu_t* emu, void* a)
|
||||
RWNativeEnd(rw); // this one never free the RWops
|
||||
return r;
|
||||
}
|
||||
void EXPORT *my_Mix_LoadWAV_RW(x86emu_t* emu, void* a, int32_t b)
|
||||
EXPORT void* my_Mix_LoadWAV_RW(x86emu_t* emu, void* a, int32_t b)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a);
|
||||
@@ -88,95 +219,40 @@ void EXPORT *my_Mix_LoadWAV_RW(x86emu_t* emu, void* a, int32_t b)
|
||||
return r;
|
||||
}
|
||||
|
||||
static void sdl1mixerPostCallback(void *userdata, uint8_t *stream, int32_t len)
|
||||
{
|
||||
x86emu_t *emu = (x86emu_t*) userdata;
|
||||
SetCallbackArg(emu, 1, stream);
|
||||
SetCallbackArg(emu, 2, (void*)len);
|
||||
RunCallback(emu);
|
||||
}
|
||||
|
||||
void EXPORT my_Mix_SetPostMix(x86emu_t* emu, void* a, void* b)
|
||||
EXPORT void my_Mix_SetPostMix(x86emu_t* emu, void* a, void* b)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
// create a callback
|
||||
if(a) {
|
||||
x86emu_t *cbemu = AddCallback(emu, (uintptr_t)a, 3, b, NULL, NULL, NULL);
|
||||
my->Mix_SetPostMix(sdl1mixerPostCallback, cbemu);
|
||||
if(my->PostCallback)
|
||||
FreeCallback(my->PostCallback);
|
||||
my->PostCallback = cbemu;
|
||||
} else {
|
||||
my->Mix_SetPostMix(NULL, b);
|
||||
FreeCallback(my->PostCallback);
|
||||
my->PostCallback = NULL;
|
||||
}
|
||||
my->Mix_SetPostMix(find_MixFunc_Fct(a), b);
|
||||
}
|
||||
|
||||
x86emu_t* sdl1channelfinished_emu = NULL;
|
||||
static void sdl1ChannelFinishedCallback(int channel)
|
||||
{
|
||||
if(!sdl1channelfinished_emu)
|
||||
return;
|
||||
SetCallbackArg(sdl1channelfinished_emu, 0, (void*)channel);
|
||||
RunCallback(sdl1channelfinished_emu);
|
||||
}
|
||||
void EXPORT my_Mix_ChannelFinished(x86emu_t* emu, void* cb)
|
||||
EXPORT void my_Mix_ChannelFinished(x86emu_t* emu, void* cb)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
if(sdl1channelfinished_emu) {
|
||||
FreeCallback(sdl1channelfinished_emu);
|
||||
sdl1channelfinished_emu = NULL;
|
||||
}
|
||||
if(cb) {
|
||||
sdl1channelfinished_emu = AddCallback(emu, (uintptr_t)cb, 1, NULL, NULL, NULL, NULL);
|
||||
my->Mix_ChannelFinished(sdl1ChannelFinishedCallback);
|
||||
} else
|
||||
my->Mix_ChannelFinished(NULL);
|
||||
}
|
||||
static void sdl1mixer_hookMusicCallback(void* udata, uint8_t* stream, int32_t len)
|
||||
{
|
||||
x86emu_t *emu = (x86emu_t*)udata;
|
||||
SetCallbackArg(emu, 1, (void*)stream);
|
||||
SetCallbackArg(emu, 2, (void*)len);
|
||||
RunCallback(emu);
|
||||
my->Mix_ChannelFinished(find_ChannelFinished_Fct(cb));
|
||||
}
|
||||
|
||||
EXPORT void my_Mix_HookMusic(x86emu_t* emu, void* f, void* arg)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
if(my->hookMusicCB) {
|
||||
my->Mix_HookMusic(NULL, NULL);
|
||||
FreeCallback(my->hookMusicCB);
|
||||
my->hookMusicCB = NULL;
|
||||
}
|
||||
if(!f)
|
||||
return;
|
||||
x86emu_t *cb = NULL;
|
||||
cb = AddCallback(emu, (uintptr_t)f, 3, arg, NULL, NULL, NULL);
|
||||
my->hookMusicCB = cb;
|
||||
my->Mix_HookMusic(sdl1mixer_hookMusicCallback, cb);
|
||||
}
|
||||
|
||||
static void sdl1mixer_hookMusicFinitCallback()
|
||||
{
|
||||
x86emu_t *emu = hookMusicFinitCB;
|
||||
if(emu)
|
||||
RunCallback(emu);
|
||||
my->Mix_HookMusic(find_MixFunc_Fct(f), arg);
|
||||
}
|
||||
|
||||
EXPORT void my_Mix_HookMusicFinished(x86emu_t* emu, void* f)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
if(hookMusicFinitCB) {
|
||||
my->Mix_HookMusicFinished(NULL);
|
||||
FreeCallback(hookMusicFinitCB);
|
||||
hookMusicFinitCB = NULL;
|
||||
}
|
||||
if(!f)
|
||||
return;
|
||||
hookMusicFinitCB = AddCallback(emu, (uintptr_t)f, 0, NULL, NULL, NULL, NULL);
|
||||
my->Mix_HookMusicFinished(sdl1mixer_hookMusicFinitCallback);
|
||||
my->Mix_HookMusicFinished(find_MusicFinished_Fct(f));
|
||||
}
|
||||
|
||||
EXPORT int my_Mix_RegisterEffect(x86emu_t* emu, int chan, void* f, void* d, void *arg)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
return my->Mix_RegisterEffect(chan, find_EffectFunc_Fct(f), find_EffectDone_Fct(d), arg);
|
||||
}
|
||||
|
||||
EXPORT int my_Mix_UnregisterEffect(x86emu_t* emu, int channel, void* f)
|
||||
{
|
||||
sdl1mixer_my_t *my = (sdl1mixer_my_t *)emu->context->sdl1mixerlib->priv.w.p2;
|
||||
return my->Mix_UnregisterEffect(channel, find_EffectFunc_Fct(f));
|
||||
}
|
||||
|
||||
const char* sdl1mixerName = "libSDL_mixer-1.2.so.0";
|
||||
|
||||
@@ -54,7 +54,7 @@ GO(Mix_QuerySpec,iFppp)
|
||||
GO(Mix_QuickLoad_RAW,pFpu)
|
||||
GO(Mix_QuickLoad_WAV,pFp)
|
||||
GO(Mix_Quit,vFv)
|
||||
//GO(Mix_RegisterEffect,iFiBBp)
|
||||
GOM(Mix_RegisterEffect,iFEippp)
|
||||
GO(Mix_ReserveChannels,iFi)
|
||||
GO(Mix_Resume,vFi)
|
||||
GO(Mix_ResumeMusic,vFv)
|
||||
@@ -68,8 +68,8 @@ GOM(Mix_SetPostMix,vFEpp)
|
||||
GO(Mix_SetReverseStereo,iFii)
|
||||
GO(Mix_SetSoundFonts,iFp)
|
||||
GO(Mix_SetSynchroValue,iFi)
|
||||
//GO(Mix_UnregisterAllEffects,iFi)
|
||||
//GO(Mix_UnregisterEffect,iFiB)
|
||||
GO(Mix_UnregisterAllEffects,iFi)
|
||||
GOM(Mix_UnregisterEffect,iFEip)
|
||||
GO(Mix_Volume,iFii)
|
||||
GO(Mix_VolumeChunk,iFpi)
|
||||
GO(Mix_VolumeMusic,iFi)
|
||||
|
||||
@@ -162,6 +162,7 @@ typedef SDL_GameControllerButtonBind (*SFpi_t)(void*, int32_t);
|
||||
GO(SDL_IsJoystickXboxOne, iFWW_t) \
|
||||
GO(SDL_IsJoystickXInput, iFS_t) \
|
||||
GO(SDL_IsJoystickHIDAPI, iFS_t) \
|
||||
GO(SDL_Vulkan_GetVkGetInstanceProcAddr, pFv_t) \
|
||||
|
||||
typedef struct sdl2_my_s {
|
||||
#define GO(A, B) B A;
|
||||
@@ -1019,6 +1020,19 @@ EXPORT int32_t my2_SDL_IsJoystickHIDAPI(x86emu_t* emu, void *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* my_vkGetDeviceProcAddr(x86emu_t* emu, void* device, void* name);
|
||||
EXPORT void* my2_SDL_Vulkan_GetVkGetInstanceProcAddr(x86emu_t* emu)
|
||||
{
|
||||
sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2;
|
||||
|
||||
if(!emu->context->vkprocaddress)
|
||||
emu->context->vkprocaddress = (vkprocaddess_t)my->SDL_Vulkan_GetVkGetInstanceProcAddr();
|
||||
|
||||
if(emu->context->vkprocaddress)
|
||||
return my_vkGetDeviceProcAddr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* sdl2Name = "libSDL2-2.0.so.0";
|
||||
#define LIBNAME sdl2
|
||||
|
||||
|
||||
@@ -644,12 +644,12 @@ GO(SDL_VideoInit, iFp)
|
||||
GO(SDL_VideoQuit, vFv)
|
||||
GOM(SDL_vsnprintf, iFEpupVV)
|
||||
// SDL_vsscanf
|
||||
// SDL_Vulkan_CreateSurface
|
||||
// SDL_Vulkan_GetDrawableSize
|
||||
// SDL_Vulkan_GetInstanceExtensions
|
||||
// SDL_Vulkan_GetVkGetInstanceProcAddr
|
||||
// SDL_Vulkan_LoadLibrary
|
||||
// SDL_Vulkan_UnloadLibrary
|
||||
GO(SDL_Vulkan_CreateSurface, iFppp)
|
||||
GO(SDL_Vulkan_GetDrawableSize, vFppp)
|
||||
GO(SDL_Vulkan_GetInstanceExtensions, iFppp)
|
||||
GOM(SDL_Vulkan_GetVkGetInstanceProcAddr, pFEv)
|
||||
GO(SDL_Vulkan_LoadLibrary, iFp) //TODO: wrap to also call my_dlopen with path?
|
||||
GO(SDL_Vulkan_UnloadLibrary, vFv)
|
||||
GO(SDL_WaitEvent, iFp)
|
||||
GO(SDL_WaitEventTimeout, iFpi)
|
||||
GO(SDL_WaitThread, vFpp)
|
||||
|
||||
+160
-153
@@ -20,22 +20,29 @@
|
||||
KHASH_MAP_INIT_INT(effectcb, x86emu_t*)
|
||||
|
||||
typedef void* (*pFpi_t)(void*, int32_t);
|
||||
typedef int32_t(*iFip_t)(int32_t, void*);
|
||||
typedef void* (*pFpii_t)(void*, int32_t, int32_t);
|
||||
typedef void (*vFpp_t)(void*, void*);
|
||||
typedef void (*vFp_t)(void*);
|
||||
typedef int32_t (*iFippp_t)(int32_t, void*, void*, void*);
|
||||
typedef int (*iFiwC_t)(int, int16_t, uint8_t);
|
||||
|
||||
#define SUPER() \
|
||||
GO(Mix_LoadMUSType_RW,pFpii_t) \
|
||||
GO(Mix_LoadMUS_RW,pFpi_t) \
|
||||
GO(Mix_LoadWAV_RW,pFpi_t) \
|
||||
GO(Mix_SetPostMix,vFpp_t) \
|
||||
GO(Mix_RegisterEffect, iFippp_t) \
|
||||
GO(Mix_UnregisterEffect, iFip_t) \
|
||||
GO(Mix_ChannelFinished,vFp_t) \
|
||||
GO(Mix_HookMusic, vFpp_t) \
|
||||
GO(Mix_HookMusicFinished, vFp_t) \
|
||||
GO(Mix_SetPosition, iFiwC_t) \
|
||||
|
||||
typedef struct sdl2mixer_my_s {
|
||||
pFpii_t Mix_LoadMUSType_RW;
|
||||
pFpi_t Mix_LoadMUS_RW;
|
||||
pFpi_t Mix_LoadWAV_RW;
|
||||
vFpp_t Mix_SetPostMix;
|
||||
iFippp_t Mix_RegisterEffect;
|
||||
vFp_t Mix_ChannelFinished;
|
||||
vFpp_t Mix_HookMusic;
|
||||
vFp_t Mix_HookMusicFinished;
|
||||
iFiwC_t Mix_SetPosition;
|
||||
#define GO(A, B) B A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
|
||||
x86emu_t* PostCallback;
|
||||
x86emu_t* hookMusicCB;
|
||||
@@ -43,59 +50,152 @@ typedef struct sdl2mixer_my_s {
|
||||
kh_effectcb_t *effectcb;
|
||||
} sdl2mixer_my_t;
|
||||
|
||||
static x86emu_t* hookMusicFinitCB = NULL;
|
||||
|
||||
static void* getSDL2MixerMy(library_t* lib)
|
||||
{
|
||||
sdl2mixer_my_t* my = (sdl2mixer_my_t*)calloc(1, sizeof(sdl2mixer_my_t));
|
||||
#define GO(A, W) my->A = (W)dlsym(lib->priv.w.lib, #A);
|
||||
GO(Mix_LoadMUSType_RW,pFpii_t)
|
||||
GO(Mix_LoadMUS_RW,pFpi_t)
|
||||
GO(Mix_LoadWAV_RW,pFpi_t)
|
||||
GO(Mix_SetPostMix,vFpp_t)
|
||||
GO(Mix_RegisterEffect, iFippp_t)
|
||||
GO(Mix_ChannelFinished,vFp_t)
|
||||
GO(Mix_HookMusic, vFpp_t)
|
||||
GO(Mix_HookMusicFinished, vFp_t)
|
||||
GO(Mix_SetPosition, iFiwC_t)
|
||||
SUPER()
|
||||
#undef GO
|
||||
my->effectcb = kh_init(effectcb);
|
||||
|
||||
return my;
|
||||
}
|
||||
|
||||
static void freeSDL2MixerMy(library_t* lib)
|
||||
{
|
||||
sdl2mixer_my_t *my = lib->priv.w.p2;
|
||||
if(my->PostCallback)
|
||||
FreeCallback(my->PostCallback);
|
||||
if(my->hookMusicCB)
|
||||
FreeCallback(my->hookMusicCB);
|
||||
if(hookMusicFinitCB)
|
||||
FreeCallback(hookMusicFinitCB);
|
||||
hookMusicFinitCB = NULL;
|
||||
// sdl2mixer_my_t *my = lib->priv.w.p2;
|
||||
}
|
||||
|
||||
void EffectFuncCallback(int chan, void *stream, int len, void *udata)
|
||||
{
|
||||
x86emu_t *emu = (x86emu_t*) udata;
|
||||
SetCallbackNArg(emu, 3);
|
||||
SetCallbackArg(emu, 0, (void*)chan);
|
||||
SetCallbackArg(emu, 1, stream);
|
||||
SetCallbackArg(emu, 2, (void*)len);
|
||||
SetCallbackArg(emu, 3, GetCallbackArg(emu, 4));
|
||||
SetCallbackAddress(emu, (uintptr_t)GetCallbackArg(emu, 5));
|
||||
RunCallback(emu);
|
||||
#undef SUPER
|
||||
|
||||
#define SUPER() \
|
||||
GO(0) \
|
||||
GO(1) \
|
||||
GO(2) \
|
||||
GO(3) \
|
||||
GO(4)
|
||||
|
||||
// EffectFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_EffectFunc_fct_##A = 0; \
|
||||
static void my_EffectFunc_##A(int chan, void *stream, int len, void *udata) \
|
||||
{ \
|
||||
RunFunction(my_context, my_EffectFunc_fct_##A, 4, chan, stream, len, udata); \
|
||||
}
|
||||
void EffectDoneCallback(int chan, void *udata)
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_EffectFunc_Fct(void* fct)
|
||||
{
|
||||
x86emu_t *emu = (x86emu_t*) udata;
|
||||
SetCallbackNArg(emu, 2);
|
||||
SetCallbackArg(emu, 0, (void*)chan);
|
||||
SetCallbackArg(emu, 1, GetCallbackArg(emu, 4));
|
||||
SetCallbackAddress(emu, (uintptr_t)GetCallbackArg(emu, 6));
|
||||
RunCallback(emu);
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_EffectFunc_fct_##A == (uintptr_t)fct) return my_EffectFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_EffectFunc_fct_##A == 0) {my_EffectFunc_fct_##A = (uintptr_t)fct; return my_EffectFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer EffectFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// EffectDone
|
||||
#define GO(A) \
|
||||
static uintptr_t my_EffectDone_fct_##A = 0; \
|
||||
static void my_EffectDone_##A(int chan, void *udata) \
|
||||
{ \
|
||||
RunFunction(my_context, my_EffectDone_fct_##A, 2, chan, udata); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_EffectDone_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_EffectDone_fct_##A == (uintptr_t)fct) return my_EffectDone_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_EffectDone_fct_##A == 0) {my_EffectDone_fct_##A = (uintptr_t)fct; return my_EffectDone_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer EffectDone callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// MixFunc
|
||||
#define GO(A) \
|
||||
static uintptr_t my_MixFunc_fct_##A = 0; \
|
||||
static void my_MixFunc_##A(void *udata, uint8_t *stream, int len) \
|
||||
{ \
|
||||
RunFunction(my_context, my_MixFunc_fct_##A, 3, udata, stream, len); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_MixFunc_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_MixFunc_fct_##A == (uintptr_t)fct) return my_MixFunc_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_MixFunc_fct_##A == 0) {my_MixFunc_fct_##A = (uintptr_t)fct; return my_MixFunc_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer MixFunc callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// ChannelFinished
|
||||
#define GO(A) \
|
||||
static uintptr_t my_ChannelFinished_fct_##A = 0; \
|
||||
static void my_ChannelFinished_##A(int channel) \
|
||||
{ \
|
||||
RunFunction(my_context, my_ChannelFinished_fct_##A, 1, channel); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_ChannelFinished_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_ChannelFinished_fct_##A == (uintptr_t)fct) return my_ChannelFinished_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_ChannelFinished_fct_##A == 0) {my_ChannelFinished_fct_##A = (uintptr_t)fct; return my_ChannelFinished_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer ChannelFinished callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// MusicFinished
|
||||
#define GO(A) \
|
||||
static uintptr_t my_MusicFinished_fct_##A = 0; \
|
||||
static void my_MusicFinished_##A() \
|
||||
{ \
|
||||
RunFunction(my_context, my_MusicFinished_fct_##A, 0); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_MusicFinished_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return NULL;
|
||||
void* p;
|
||||
if((p = GetNativeFnc((uintptr_t)fct))) return p;
|
||||
#define GO(A) if(my_MusicFinished_fct_##A == (uintptr_t)fct) return my_MusicFinished_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_MusicFinished_fct_##A == 0) {my_MusicFinished_fct_##A = (uintptr_t)fct; return my_MusicFinished_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for SDL1Mixer MusicFinished callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#undef SUPER
|
||||
|
||||
EXPORT void* my2_Mix_LoadMUSType_RW(x86emu_t* emu, void* a, int32_t b, int32_t c)
|
||||
{
|
||||
sdl2mixer_my_t *my = (sdl2mixer_my_t *)emu->context->sdl2mixerlib->priv.w.p2;
|
||||
@@ -124,138 +224,45 @@ EXPORT void* my2_Mix_LoadWAV_RW(x86emu_t* emu, void* a, int32_t f)
|
||||
return r;
|
||||
}
|
||||
|
||||
static void sdl2mixerPostCallback(void *userdata, uint8_t *stream, int32_t len)
|
||||
{
|
||||
x86emu_t *emu = (x86emu_t*) userdata;
|
||||
SetCallbackArg(emu, 1, stream);
|
||||
SetCallbackArg(emu, 2, (void*)len);
|
||||
RunCallback(emu);
|
||||
}
|
||||
|
||||
EXPORT void my2_Mix_SetPostMix(x86emu_t* emu, void* a, void* b)
|
||||
{
|
||||
sdl2mixer_my_t *my = (sdl2mixer_my_t *)emu->context->sdl2mixerlib->priv.w.p2;
|
||||
// create a callback
|
||||
if(a) {
|
||||
x86emu_t *cbemu = AddCallback(emu, (uintptr_t)a, 3, b, NULL, NULL, NULL);
|
||||
my->Mix_SetPostMix(sdl2mixerPostCallback, cbemu);
|
||||
if(my->PostCallback)
|
||||
FreeCallback(my->PostCallback);
|
||||
my->PostCallback = cbemu;
|
||||
} else {
|
||||
my->Mix_SetPostMix(NULL, b);
|
||||
FreeCallback(my->PostCallback);
|
||||
my->PostCallback = NULL;
|
||||
}
|
||||
my->Mix_SetPostMix(find_MixFunc_Fct(a), b);
|
||||
}
|
||||
|
||||
EXPORT int32_t my2_Mix_RegisterEffect(x86emu_t*emu, int32_t channel, void* cb_effect, void* cb_done, void* arg)
|
||||
{
|
||||
#if 0
|
||||
sdl2mixer_my_t *my = (sdl2mixer_my_t *)emu->context->sdl2mixerlib->priv.w.p2;
|
||||
x86emu_t *effect = NULL;
|
||||
khint_t k;
|
||||
void* cb1 = NULL;
|
||||
void* cb2 = NULL;
|
||||
// best way to do it would probably be to create only 1 effect and done callback, and do the registering / per channel stuff there directly
|
||||
if(channel == -2) {
|
||||
effect = AddCallback(emu, (uintptr_t)cb_effect, 4, NULL, NULL, NULL, arg);
|
||||
SetCallbackArg(effect, 4, arg);
|
||||
SetCallbackArg(effect, 5, cb_effect);
|
||||
SetCallbackArg(effect, 6, cb_done);
|
||||
if(cb_effect) {
|
||||
k = kh_get(effectcb, my->effectcb, (uintptr_t)effect);
|
||||
if(k==kh_end(my->effectcb)) {
|
||||
int ret;
|
||||
k = kh_put(effectcb, my->effectcb, (uintptr_t)cb_effect, &ret);
|
||||
kh_value(my->effectcb, k) = effect;
|
||||
} else {
|
||||
effect = kh_value(my->effectcb, k);
|
||||
}
|
||||
cb1 = EffectFuncCallback;
|
||||
}
|
||||
if(cb_done) {
|
||||
k = kh_get(effectcb, my->effectcb, (uintptr_t)effect);
|
||||
if(k==kh_end(my->effectcb)) {
|
||||
int ret;
|
||||
k = kh_put(effectcb, my->effectcb, (uintptr_t)cb_done, &ret);
|
||||
kh_value(my->effectcb, k) = effect;
|
||||
} else {
|
||||
effect = kh_value(my->effectcb, k);
|
||||
}
|
||||
cb2 = EffectDoneCallback;
|
||||
}
|
||||
return my->Mix_RegisterEffect(channel, cb1, cb2, effect);
|
||||
}
|
||||
#endif
|
||||
printf("Warning: Mix_RegisterEffect(%d, %p, %p, %p) Ignored\n", channel, cb_effect, cb_done, arg);
|
||||
return 0;
|
||||
|
||||
return my->Mix_RegisterEffect(channel, find_EffectFunc_Fct(cb_effect), find_EffectDone_Fct(cb_done), arg);
|
||||
}
|
||||
|
||||
x86emu_t* sdl2channelfinished_emu = NULL;
|
||||
static void sdl2ChannelFinishedCallback(int channel)
|
||||
{
|
||||
if(!sdl2channelfinished_emu)
|
||||
return;
|
||||
SetCallbackArg(sdl2channelfinished_emu, 0, (void*)channel);
|
||||
RunCallback(sdl2channelfinished_emu);
|
||||
}
|
||||
void EXPORT my2_Mix_ChannelFinished(x86emu_t* emu, void* cb)
|
||||
EXPORT int32_t my2_Mix_UnregisterEffect(x86emu_t* emu, int channel, void* f)
|
||||
{
|
||||
sdl2mixer_my_t *my = (sdl2mixer_my_t *)emu->context->sdl2mixerlib->priv.w.p2;
|
||||
if(sdl2channelfinished_emu) {
|
||||
FreeCallback(sdl2channelfinished_emu);
|
||||
sdl2channelfinished_emu = NULL;
|
||||
}
|
||||
if(cb) {
|
||||
sdl2channelfinished_emu = AddCallback(emu, (uintptr_t)cb, 1, NULL, NULL, NULL, NULL);
|
||||
my->Mix_ChannelFinished(sdl2ChannelFinishedCallback);
|
||||
} else
|
||||
my->Mix_ChannelFinished(NULL);
|
||||
|
||||
return my->Mix_UnregisterEffect(channel, find_EffectFunc_Fct(f));
|
||||
}
|
||||
static void sdl2mixer_hookMusicCallback(void* udata, uint8_t* stream, int32_t len)
|
||||
|
||||
EXPORT void my2_Mix_ChannelFinished(x86emu_t* emu, void* cb)
|
||||
{
|
||||
x86emu_t *emu = (x86emu_t*)udata;
|
||||
SetCallbackArg(emu, 1, (void*)stream);
|
||||
SetCallbackArg(emu, 2, (void*)len);
|
||||
RunCallback(emu);
|
||||
sdl2mixer_my_t *my = (sdl2mixer_my_t *)emu->context->sdl2mixerlib->priv.w.p2;
|
||||
|
||||
my->Mix_ChannelFinished(find_ChannelFinished_Fct(cb));
|
||||
}
|
||||
|
||||
EXPORT void my2_Mix_HookMusic(x86emu_t* emu, void* f, void* arg)
|
||||
{
|
||||
sdl2mixer_my_t *my = (sdl2mixer_my_t *)emu->context->sdl2mixerlib->priv.w.p2;
|
||||
if(my->hookMusicCB) {
|
||||
my->Mix_HookMusic(NULL, NULL);
|
||||
FreeCallback(my->hookMusicCB);
|
||||
my->hookMusicCB = NULL;
|
||||
}
|
||||
if(!f)
|
||||
return;
|
||||
x86emu_t *cb = NULL;
|
||||
cb = AddCallback(emu, (uintptr_t)f, 3, arg, NULL, NULL, NULL);
|
||||
my->hookMusicCB = cb;
|
||||
my->Mix_HookMusic(sdl2mixer_hookMusicCallback, cb);
|
||||
}
|
||||
|
||||
static void sdl2mixer_hookMusicFinitCallback()
|
||||
{
|
||||
x86emu_t *emu = hookMusicFinitCB;
|
||||
if(emu)
|
||||
RunCallback(emu);
|
||||
my->Mix_HookMusic(find_MixFunc_Fct(f), arg);
|
||||
}
|
||||
|
||||
EXPORT void my2_Mix_HookMusicFinished(x86emu_t* emu, void* f)
|
||||
{
|
||||
sdl2mixer_my_t *my = (sdl2mixer_my_t *)emu->context->sdl2mixerlib->priv.w.p2;
|
||||
if(hookMusicFinitCB) {
|
||||
my->Mix_HookMusicFinished(NULL);
|
||||
FreeCallback(hookMusicFinitCB);
|
||||
hookMusicFinitCB = NULL;
|
||||
}
|
||||
if(!f)
|
||||
return;
|
||||
hookMusicFinitCB = AddCallback(emu, (uintptr_t)f, 0, NULL, NULL, NULL, NULL);
|
||||
my->Mix_HookMusicFinished(sdl2mixer_hookMusicFinitCallback);
|
||||
|
||||
my->Mix_HookMusicFinished(find_MusicFinished_Fct(f));
|
||||
}
|
||||
|
||||
// This is a hack for AntiChamber
|
||||
|
||||
@@ -78,8 +78,8 @@ GOM(Mix_SetPostMix,vFEpp)
|
||||
GO(Mix_SetReverseStereo,iFii)
|
||||
GO(Mix_SetSoundFonts,iFp)
|
||||
GO(Mix_SetSynchroValue,iFi)
|
||||
// Mix_UnregisterAllEffects
|
||||
// Mix_UnregisterEffect
|
||||
GO(Mix_UnregisterAllEffects, iFi)
|
||||
GOM(Mix_UnregisterEffect, iFEip)
|
||||
GO(Mix_Volume,iFii)
|
||||
GO(Mix_VolumeChunk,iFpi)
|
||||
GO(Mix_VolumeMusic,iFi)
|
||||
|
||||
Executable
+669
@@ -0,0 +1,669 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define _GNU_SOURCE /* See feature_test_macros(7) */
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "wrappedlibs.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "wrapper.h"
|
||||
#include "bridge.h"
|
||||
#include "librarian/library_private.h"
|
||||
#include "x86emu.h"
|
||||
#include "emu/x86emu_private.h"
|
||||
#include "box86context.h"
|
||||
#include "librarian.h"
|
||||
#include "callback.h"
|
||||
#include "libtools/vkalign.h"
|
||||
|
||||
//extern char* libvulkan;
|
||||
|
||||
const char* vulkanName = "libvulkan.so.1";
|
||||
#define LIBNAME vulkan
|
||||
static library_t *my_lib = NULL;
|
||||
|
||||
typedef void(*vFpp_t) (void*, void*);
|
||||
typedef void*(*pFpp_t) (void*, void*);
|
||||
typedef int (*iFppp_t) (void*, void*, void*);
|
||||
typedef void(*vFppp_t) (void*, void*, void*);
|
||||
typedef void(*vFpUp_t) (void*, uint64_t, void*);
|
||||
typedef int (*iFpppp_t) (void*, void*, void*, void*);
|
||||
typedef int (*iFpUup_t) (void*, uint64_t, uint32_t, void*);
|
||||
typedef int (*iFppppp_t) (void*, void*, void*, void*, void*);
|
||||
typedef int (*iFpuppp_t) (void*, uint32_t, void*, void*, void*);
|
||||
typedef int (*iFpUppp_t) (void*, uint64_t, void*, void*, void*);
|
||||
typedef void(*vFpupup_t) (void*, uint32_t, void*, uint32_t, void*);
|
||||
typedef int (*iFpUuppp_t) (void*, uint64_t, uint32_t, void*, void*, void*);
|
||||
typedef void(*vFpiiiiipp_t) (void*, int, int, int, int, int, void*, void*);
|
||||
typedef void(*vFpiiiupupup_t)(void*, int, int, int, uint32_t, void*, uint32_t, void*, uint32_t, void*);
|
||||
|
||||
#define SUPER() \
|
||||
GO(vkAllocateMemory, iFpppp_t) \
|
||||
GO(vkCreateBuffer, iFpppp_t) \
|
||||
GO(vkCreateBufferView, iFpppp_t) \
|
||||
GO(vkCreateCommandPool, iFpppp_t) \
|
||||
GO(vkCreateComputePipelines, iFpUuppp_t) \
|
||||
GO(vkCreateDescriptorPool, iFpppp_t) \
|
||||
GO(vkCreateDescriptorSetLayout, iFpppp_t) \
|
||||
GO(vkCreateDescriptorUpdateTemplate, iFpppp_t) \
|
||||
GO(vkCreateDescriptorUpdateTemplateKHR, iFpppp_t)\
|
||||
GO(vkCreateDevice, iFpppp_t) \
|
||||
GO(vkCreateDisplayModeKHR, iFpUppp_t) \
|
||||
GO(vkCreateDisplayPlaneSurfaceKHR, iFpppp_t) \
|
||||
GO(vkCreateEvent, iFpppp_t) \
|
||||
GO(vkCreateFence, iFpppp_t) \
|
||||
GO(vkCreateFramebuffer, iFpppp_t) \
|
||||
GO(vkCreateGraphicsPipelines, iFpUuppp_t) \
|
||||
GO(vkCreateImage, iFpppp_t) \
|
||||
GO(vkCreateImageView, iFpppp_t) \
|
||||
GO(vkCreateInstance, iFppp_t) \
|
||||
GO(vkCreatePipelineCache, iFpppp_t) \
|
||||
GO(vkCreatePipelineLayout, iFpppp_t) \
|
||||
GO(vkCreateQueryPool, iFpppp_t) \
|
||||
GO(vkCreateRenderPass, iFpppp_t) \
|
||||
GO(vkCreateSampler, iFpppp_t) \
|
||||
GO(vkCreateSamplerYcbcrConversion, iFpppp_t) \
|
||||
GO(vkCreateSemaphore, iFpppp_t) \
|
||||
GO(vkCreateShaderModule, iFpppp_t) \
|
||||
GO(vkCreateSharedSwapchainsKHR, iFpuppp_t) \
|
||||
GO(vkCreateSwapchainKHR, iFpppp_t) \
|
||||
GO(vkCreateWaylandSurfaceKHR, iFpppp_t) \
|
||||
GO(vkCreateXcbSurfaceKHR, iFpppp_t) \
|
||||
GO(vkCreateXlibSurfaceKHR, iFpppp_t) \
|
||||
GO(vkDestroyBuffer, vFpUp_t) \
|
||||
GO(vkDestroyBufferView, vFpUp_t) \
|
||||
GO(vkDestroyCommandPool, vFpUp_t) \
|
||||
GO(vkDestroyDescriptorPool, vFpUp_t) \
|
||||
GO(vkDestroyDescriptorSetLayout, vFpUp_t) \
|
||||
GO(vkDestroyDescriptorUpdateTemplate, vFpUp_t) \
|
||||
GO(vkDestroyDescriptorUpdateTemplateKHR, vFpUp_t)\
|
||||
GO(vkDestroyDevice, vFpp_t) \
|
||||
GO(vkDestroyEvent, vFpUp_t) \
|
||||
GO(vkDestroyFence, vFpUp_t) \
|
||||
GO(vkDestroyFramebuffer, vFpUp_t) \
|
||||
GO(vkDestroyImage, vFpUp_t) \
|
||||
GO(vkDestroyImageView, vFpUp_t) \
|
||||
GO(vkDestroyInstance, vFpp_t) \
|
||||
GO(vkDestroyPipeline, vFpUp_t) \
|
||||
GO(vkDestroyPipelineCache, vFpUp_t) \
|
||||
GO(vkDestroyPipelineLayout, vFpUp_t) \
|
||||
GO(vkDestroyQueryPool, vFpUp_t) \
|
||||
GO(vkDestroyRenderPass, vFpUp_t) \
|
||||
GO(vkDestroySampler, vFpUp_t) \
|
||||
GO(vkDestroySamplerYcbcrConversion, vFpUp_t) \
|
||||
GO(vkDestroySamplerYcbcrConversionKHR, vFpUp_t) \
|
||||
GO(vkDestroySemaphore, vFpUp_t) \
|
||||
GO(vkDestroyShaderModule, vFpUp_t) \
|
||||
GO(vkDestroySurfaceKHR, vFpUp_t) \
|
||||
GO(vkDestroySwapchainKHR, vFpUp_t) \
|
||||
GO(vkFreeMemory, vFpUp_t) \
|
||||
GO(vkGetDeviceProcAddr, pFpp_t) \
|
||||
GO(vkGetInstanceProcAddr, pFpp_t) \
|
||||
GO(vkCreateDebugUtilsMessengerEXT, iFpppp_t) \
|
||||
GO(vkDestroyDebugUtilsMessengerEXT, vFppp_t) \
|
||||
GO(vkGetPhysicalDeviceProperties, vFpp_t) \
|
||||
GO(vkGetPhysicalDeviceQueueFamilyProperties, vFppp_t) \
|
||||
GO(vkGetPhysicalDeviceSparseImageFormatProperties, vFpiiiiipp_t) \
|
||||
GO(vkUpdateDescriptorSets, vFpupup_t) \
|
||||
GO(vkGetDisplayPlaneCapabilitiesKHR, iFpUup_t) \
|
||||
GO(vkGetPhysicalDeviceDisplayPropertiesKHR, iFppp_t) \
|
||||
GO(vkGetPhysicalDeviceMemoryProperties, vFpp_t) \
|
||||
GO(vkCmdPipelineBarrier, vFpiiiupupup_t) \
|
||||
|
||||
typedef struct vulkan_my_s {
|
||||
// functions
|
||||
#define GO(A, B) B A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
} vulkan_my_t;
|
||||
|
||||
void* getVulkanMy(library_t* lib)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)calloc(1, sizeof(vulkan_my_t));
|
||||
#define GO(A, W) my->A = (W)dlsym(lib->priv.w.lib, #A);
|
||||
SUPER()
|
||||
#undef GO
|
||||
return my;
|
||||
}
|
||||
void freeVulkanMy(void* p)
|
||||
{
|
||||
//vulkan_my_t* my = (vulkan_my_t*)p;
|
||||
}
|
||||
|
||||
void fillVulkanProcWrapper(box86context_t*);
|
||||
void freeVulkanProcWrapper(box86context_t*);
|
||||
|
||||
static void* resolveSymbol(x86emu_t* emu, void* symbol, const char* rname)
|
||||
{
|
||||
// check if alread bridged
|
||||
uintptr_t ret = CheckBridged(emu->context->system, symbol);
|
||||
if(ret) {
|
||||
if(dlsym_error && box86_log<LOG_DEBUG) printf_log(LOG_NONE, "%p\n", (void*)ret);
|
||||
return (void*)ret; // already bridged
|
||||
}
|
||||
// get wrapper
|
||||
khint_t k = kh_get(symbolmap, emu->context->vkwrappers, rname);
|
||||
if(k==kh_end(emu->context->vkwrappers) && strstr(rname, "KHR")==NULL) {
|
||||
// try again, adding KHR at the end if not present
|
||||
char tmp[200];
|
||||
strcpy(tmp, rname);
|
||||
strcat(tmp, "KHR");
|
||||
k = kh_get(symbolmap, emu->context->vkwrappers, tmp);
|
||||
}
|
||||
if(k==kh_end(emu->context->vkwrappers)) {
|
||||
if(dlsym_error && box86_log<LOG_DEBUG) printf_log(LOG_NONE, "%p\n", NULL);
|
||||
if(dlsym_error && box86_log<LOG_INFO) printf_log(LOG_NONE, "Warning, no wrapper for %s\n", rname);
|
||||
return NULL;
|
||||
}
|
||||
AddOffsetSymbol(emu->context->maplib, symbol, rname);
|
||||
ret = AddBridge(emu->context->system, kh_value(emu->context->vkwrappers, k), symbol, 0);
|
||||
if(dlsym_error && box86_log<LOG_DEBUG) printf_log(LOG_NONE, "%p (%p)\n", (void*)ret, symbol);
|
||||
return (void*)ret;
|
||||
}
|
||||
|
||||
EXPORT void* my_vkGetDeviceProcAddr(x86emu_t* emu, void* device, void* name)
|
||||
{
|
||||
khint_t k;
|
||||
const char* rname = (const char*)name;
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
if(dlsym_error && box86_log<LOG_DEBUG) printf_log(LOG_NONE, "Calling my_vkGetDeviceProcAddr(%p, \"%s\") => ", device, rname);
|
||||
if(!emu->context->vkwrappers)
|
||||
fillVulkanProcWrapper(emu->context);
|
||||
k = kh_get(symbolmap, emu->context->vkmymap, rname);
|
||||
int is_my = (k==kh_end(emu->context->vkmymap))?0:1;
|
||||
void* symbol;
|
||||
if(is_my) {
|
||||
// try again, by using custom "my_" now...
|
||||
char tmp[200];
|
||||
strcpy(tmp, "my_");
|
||||
strcat(tmp, rname);
|
||||
symbol = dlsym(emu->context->box86lib, tmp);
|
||||
// need to update symbol link maybe
|
||||
#define GO(A, W) if(!strcmp(rname, #A)) my->A = (W)my->vkGetDeviceProcAddr(device, name);
|
||||
SUPER()
|
||||
#undef GO
|
||||
} else
|
||||
symbol = my->vkGetDeviceProcAddr(device, name);
|
||||
if(!symbol) {
|
||||
if(dlsym_error && box86_log<LOG_DEBUG) printf_log(LOG_NONE, "%p\n", NULL);
|
||||
return NULL; // easy
|
||||
}
|
||||
return resolveSymbol(emu, symbol, rname);
|
||||
}
|
||||
|
||||
EXPORT void* my_vkGetInstanceProcAddr(x86emu_t* emu, void* instance, void* name)
|
||||
{
|
||||
khint_t k;
|
||||
const char* rname = (const char*)name;
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
|
||||
if(dlsym_error && box86_log<LOG_DEBUG) printf_log(LOG_NONE, "Calling my_vkGetInstanceProcAddr(%p, \"%s\") => ", instance, rname);
|
||||
if(!emu->context->vkwrappers)
|
||||
fillVulkanProcWrapper(emu->context);
|
||||
// check if glxprocaddress is filled, and search for lib and fill it if needed
|
||||
// get proc adress using actual glXGetProcAddress
|
||||
k = kh_get(symbolmap, emu->context->vkmymap, rname);
|
||||
int is_my = (k==kh_end(emu->context->vkmymap))?0:1;
|
||||
void* symbol;
|
||||
if(is_my) {
|
||||
// try again, by using custom "my_" now...
|
||||
char tmp[200];
|
||||
strcpy(tmp, "my_");
|
||||
strcat(tmp, rname);
|
||||
symbol = dlsym(emu->context->box86lib, tmp);
|
||||
// need to update symbol link maybe
|
||||
#define GO(A, W) if(!strcmp(rname, #A)) my->A = (W)emu->context->vkprocaddress(instance, rname);;
|
||||
SUPER()
|
||||
#undef GO
|
||||
} else
|
||||
symbol = emu->context->vkprocaddress(instance, rname);
|
||||
if(!symbol) {
|
||||
if(dlsym_error && box86_log<LOG_DEBUG) printf_log(LOG_NONE, "%p\n", NULL);
|
||||
return NULL; // easy
|
||||
}
|
||||
return resolveSymbol(emu, symbol, rname);
|
||||
}
|
||||
|
||||
#undef SUPER
|
||||
|
||||
typedef struct my_VkAllocationCallbacks_s {
|
||||
void* pUserData;
|
||||
void* pfnAllocation;
|
||||
void* pfnReallocation;
|
||||
void* pfnFree;
|
||||
void* pfnInternalAllocation;
|
||||
void* pfnInternalFree;
|
||||
} my_VkAllocationCallbacks_t;
|
||||
|
||||
|
||||
#define SUPER() \
|
||||
GO(0) \
|
||||
GO(1) \
|
||||
GO(2) \
|
||||
GO(3) \
|
||||
GO(4)
|
||||
|
||||
// Allocation ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_Allocation_fct_##A = 0; \
|
||||
static void* my_Allocation_##A(void* a, size_t b, size_t c, int d) \
|
||||
{ \
|
||||
return (void*)RunFunction(my_context, my_Allocation_fct_##A, 4, a, b, c, d); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_Allocation_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_Allocation_fct_##A == (uintptr_t)fct) return my_Allocation_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_Allocation_fct_##A == 0) {my_Allocation_fct_##A = (uintptr_t)fct; return my_Allocation_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for Vulkan Allocation callback\n");
|
||||
return NULL;
|
||||
}
|
||||
// Reallocation ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_Reallocation_fct_##A = 0; \
|
||||
static void* my_Reallocation_##A(void* a, void* b, size_t c, size_t d, int e) \
|
||||
{ \
|
||||
return (void*)RunFunction(my_context, my_Reallocation_fct_##A, 5, a, b, c, d, e); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_Reallocation_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_Reallocation_fct_##A == (uintptr_t)fct) return my_Reallocation_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_Reallocation_fct_##A == 0) {my_Reallocation_fct_##A = (uintptr_t)fct; return my_Reallocation_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for Vulkan Reallocation callback\n");
|
||||
return NULL;
|
||||
}
|
||||
// Free ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_Free_fct_##A = 0; \
|
||||
static void my_Free_##A(void* a, void* b) \
|
||||
{ \
|
||||
RunFunction(my_context, my_Free_fct_##A, 2, a, b); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_Free_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_Free_fct_##A == (uintptr_t)fct) return my_Free_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_Free_fct_##A == 0) {my_Free_fct_##A = (uintptr_t)fct; return my_Free_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for Vulkan Free callback\n");
|
||||
return NULL;
|
||||
}
|
||||
// InternalAllocNotification ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_InternalAllocNotification_fct_##A = 0; \
|
||||
static void my_InternalAllocNotification_##A(void* a, size_t b, int c, int d) \
|
||||
{ \
|
||||
RunFunction(my_context, my_InternalAllocNotification_fct_##A, 4, a, b, c, d); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_InternalAllocNotification_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_InternalAllocNotification_fct_##A == (uintptr_t)fct) return my_InternalAllocNotification_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_InternalAllocNotification_fct_##A == 0) {my_InternalAllocNotification_fct_##A = (uintptr_t)fct; return my_InternalAllocNotification_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for Vulkan InternalAllocNotification callback\n");
|
||||
return NULL;
|
||||
}
|
||||
// InternalFreeNotification ...
|
||||
#define GO(A) \
|
||||
static uintptr_t my_InternalFreeNotification_fct_##A = 0; \
|
||||
static void my_InternalFreeNotification_##A(void* a, size_t b, int c, int d) \
|
||||
{ \
|
||||
RunFunction(my_context, my_InternalFreeNotification_fct_##A, 4, a, b, c, d); \
|
||||
}
|
||||
SUPER()
|
||||
#undef GO
|
||||
static void* find_InternalFreeNotification_Fct(void* fct)
|
||||
{
|
||||
if(!fct) return fct;
|
||||
if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
|
||||
#define GO(A) if(my_InternalFreeNotification_fct_##A == (uintptr_t)fct) return my_InternalFreeNotification_##A;
|
||||
SUPER()
|
||||
#undef GO
|
||||
#define GO(A) if(my_InternalFreeNotification_fct_##A == 0) {my_InternalFreeNotification_fct_##A = (uintptr_t)fct; return my_InternalFreeNotification_##A; }
|
||||
SUPER()
|
||||
#undef GO
|
||||
printf_log(LOG_NONE, "Warning, no more slot for Vulkan InternalFreeNotification callback\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#undef SUPER
|
||||
|
||||
//#define PRE_INIT if(libGL) {lib->priv.w.lib = dlopen(libGL, RTLD_LAZY | RTLD_GLOBAL); lib->path = strdup(libGL);} else
|
||||
|
||||
#define CUSTOM_INIT \
|
||||
my_lib = lib; \
|
||||
lib->priv.w.p2 = getVulkanMy(lib); \
|
||||
lib->priv.w.priv = dlsym(lib->priv.w.lib, "vkGetInstanceProcAddr"); \
|
||||
box86->vkprocaddress = lib->priv.w.priv;
|
||||
|
||||
#define CUSTOM_FINI \
|
||||
my_lib = NULL; \
|
||||
freeVulkanMy(lib->priv.w.p2); \
|
||||
free(lib->priv.w.p2);
|
||||
|
||||
#include "wrappedlib_init.h"
|
||||
|
||||
void fillVulkanProcWrapper(box86context_t* context)
|
||||
{
|
||||
int cnt, ret;
|
||||
khint_t k;
|
||||
kh_symbolmap_t * symbolmap = kh_init(symbolmap);
|
||||
// populates maps...
|
||||
cnt = sizeof(vulkansymbolmap)/sizeof(map_onesymbol_t);
|
||||
for (int i=0; i<cnt; ++i) {
|
||||
k = kh_put(symbolmap, symbolmap, vulkansymbolmap[i].name, &ret);
|
||||
kh_value(symbolmap, k) = vulkansymbolmap[i].w;
|
||||
}
|
||||
// and the my_ symbols map
|
||||
cnt = sizeof(MAPNAME(mysymbolmap))/sizeof(map_onesymbol_t);
|
||||
for (int i=0; i<cnt; ++i) {
|
||||
k = kh_put(symbolmap, symbolmap, vulkanmysymbolmap[i].name, &ret);
|
||||
kh_value(symbolmap, k) = vulkanmysymbolmap[i].w;
|
||||
}
|
||||
context->vkwrappers = symbolmap;
|
||||
// my_* map
|
||||
symbolmap = kh_init(symbolmap);
|
||||
cnt = sizeof(MAPNAME(mysymbolmap))/sizeof(map_onesymbol_t);
|
||||
for (int i=0; i<cnt; ++i) {
|
||||
k = kh_put(symbolmap, symbolmap, vulkanmysymbolmap[i].name, &ret);
|
||||
kh_value(symbolmap, k) = vulkanmysymbolmap[i].w;
|
||||
}
|
||||
context->vkmymap = symbolmap;
|
||||
}
|
||||
void freeVulkanProcWrapper(box86context_t* context)
|
||||
{
|
||||
if(!context)
|
||||
return;
|
||||
if(context->vkwrappers)
|
||||
kh_destroy(symbolmap, context->vkwrappers);
|
||||
if(context->vkmymap)
|
||||
kh_destroy(symbolmap, context->vkmymap);
|
||||
context->vkwrappers = NULL;
|
||||
context->vkmymap = NULL;
|
||||
}
|
||||
|
||||
my_VkAllocationCallbacks_t* find_VkAllocationCallbacks(my_VkAllocationCallbacks_t* dest, my_VkAllocationCallbacks_t* src)
|
||||
{
|
||||
if(!src) return src;
|
||||
dest->pUserData = src->pUserData;
|
||||
dest->pfnAllocation = find_Allocation_Fct(src->pfnAllocation);
|
||||
dest->pfnReallocation = find_Reallocation_Fct(src->pfnReallocation);
|
||||
dest->pfnFree = find_Free_Fct(src->pfnFree);
|
||||
dest->pfnInternalAllocation = find_InternalAllocNotification_Fct(src->pfnInternalAllocation);
|
||||
dest->pfnInternalFree = find_InternalFreeNotification_Fct(src->pfnInternalFree);
|
||||
return dest;
|
||||
}
|
||||
// functions....
|
||||
#define CREATE(A) \
|
||||
EXPORT int my_##A(x86emu_t* emu, void* device, void* pAllocateInfo, my_VkAllocationCallbacks_t* pAllocator, void* p) \
|
||||
{ \
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2; \
|
||||
my_VkAllocationCallbacks_t my_alloc; \
|
||||
return my->A(device, pAllocateInfo, find_VkAllocationCallbacks(&my_alloc, pAllocator), p); \
|
||||
}
|
||||
#define DESTROY(A) \
|
||||
EXPORT void my_##A(x86emu_t* emu, void* device, void* p, my_VkAllocationCallbacks_t* pAllocator) \
|
||||
{ \
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2; \
|
||||
my_VkAllocationCallbacks_t my_alloc; \
|
||||
my->A(device, p, find_VkAllocationCallbacks(&my_alloc, pAllocator)); \
|
||||
}
|
||||
#define DESTROY64(A) \
|
||||
EXPORT void my_##A(x86emu_t* emu, void* device, uint64_t p, my_VkAllocationCallbacks_t* pAllocator) \
|
||||
{ \
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2; \
|
||||
my_VkAllocationCallbacks_t my_alloc; \
|
||||
my->A(device, p, find_VkAllocationCallbacks(&my_alloc, pAllocator)); \
|
||||
}
|
||||
|
||||
CREATE(vkAllocateMemory)
|
||||
CREATE(vkCreateBuffer)
|
||||
CREATE(vkCreateBufferView)
|
||||
CREATE(vkCreateCommandPool)
|
||||
|
||||
EXPORT int my_vkCreateComputePipelines(x86emu_t* emu, void* device, uint64_t pipelineCache, uint32_t count, void* pCreateInfos, my_VkAllocationCallbacks_t* pAllocator, void* pPipelines)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
my_VkAllocationCallbacks_t my_alloc;
|
||||
void* aligned;
|
||||
const char* desc="upiSupiiUppUUi";
|
||||
aligned = vkalignStruct(pCreateInfos, desc, count);
|
||||
int ret = my->vkCreateComputePipelines(device, pipelineCache, count, aligned, find_VkAllocationCallbacks(&my_alloc, pAllocator), pPipelines);
|
||||
vkunalignStruct(pCreateInfos, aligned, desc, count);
|
||||
return ret;
|
||||
}
|
||||
|
||||
CREATE(vkCreateDescriptorPool)
|
||||
CREATE(vkCreateDescriptorSetLayout)
|
||||
CREATE(vkCreateDescriptorUpdateTemplate)
|
||||
CREATE(vkCreateDescriptorUpdateTemplateKHR)
|
||||
CREATE(vkCreateDevice)
|
||||
|
||||
EXPORT int my_vkCreateDisplayModeKHR(x86emu_t* emu, void* physical, uint64_t display, void* pCreateInfo, my_VkAllocationCallbacks_t* pAllocator, void* pMode)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
my_VkAllocationCallbacks_t my_alloc;
|
||||
return my->vkCreateDisplayModeKHR(physical, display, pCreateInfo, find_VkAllocationCallbacks(&my_alloc, pAllocator), pMode);
|
||||
}
|
||||
|
||||
CREATE(vkCreateDisplayPlaneSurfaceKHR)
|
||||
CREATE(vkCreateEvent)
|
||||
CREATE(vkCreateFence)
|
||||
CREATE(vkCreateFramebuffer)
|
||||
|
||||
EXPORT int my_vkCreateGraphicsPipelines(x86emu_t* emu, void* device, uint64_t pipelineCache, uint32_t count, void* pCreateInfos, my_VkAllocationCallbacks_t* pAllocator, void* pPipelines)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
my_VkAllocationCallbacks_t my_alloc;
|
||||
void* aligned;
|
||||
const char* desc="upiuppppppppppUUuUi"; //TODO: check if any substruct need alignement!
|
||||
aligned = vkalignStruct(pCreateInfos, desc, count);
|
||||
int ret = my->vkCreateGraphicsPipelines(device, pipelineCache, count, aligned, find_VkAllocationCallbacks(&my_alloc, pAllocator), pPipelines);
|
||||
vkunalignStruct(pCreateInfos, aligned, desc, count);
|
||||
return ret;
|
||||
}
|
||||
|
||||
CREATE(vkCreateImage)
|
||||
CREATE(vkCreateImageView)
|
||||
|
||||
EXPORT int my_vkCreateInstance(x86emu_t* emu, void* pCreateInfos, my_VkAllocationCallbacks_t* pAllocator, void* pInstance)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
my_VkAllocationCallbacks_t my_alloc;
|
||||
return my->vkCreateInstance(pCreateInfos, find_VkAllocationCallbacks(&my_alloc, pAllocator), pInstance);
|
||||
}
|
||||
|
||||
CREATE(vkCreatePipelineCache)
|
||||
CREATE(vkCreatePipelineLayout)
|
||||
CREATE(vkCreateQueryPool)
|
||||
CREATE(vkCreateRenderPass)
|
||||
CREATE(vkCreateSampler)
|
||||
CREATE(vkCreateSamplerYcbcrConversion)
|
||||
CREATE(vkCreateSemaphore)
|
||||
CREATE(vkCreateShaderModule)
|
||||
|
||||
EXPORT int my_vkCreateSharedSwapchainsKHR(x86emu_t* emu, void* device, uint32_t count, void** pCreateInfos, my_VkAllocationCallbacks_t* pAllocator, void* pSwapchains)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
my_VkAllocationCallbacks_t my_alloc;
|
||||
void* aligned;
|
||||
const char* desc="upiUuiiuuuiiupiiiiU";
|
||||
aligned = vkalignStruct(pCreateInfos, desc, count);
|
||||
int ret = my->vkCreateSharedSwapchainsKHR(device, count, aligned, find_VkAllocationCallbacks(&my_alloc, pAllocator), pSwapchains);
|
||||
vkunalignStruct(pCreateInfos, aligned, desc, count);
|
||||
return ret;
|
||||
}
|
||||
|
||||
CREATE(vkCreateSwapchainKHR)
|
||||
CREATE(vkCreateWaylandSurfaceKHR)
|
||||
CREATE(vkCreateXcbSurfaceKHR)
|
||||
CREATE(vkCreateXlibSurfaceKHR)
|
||||
|
||||
DESTROY64(vkDestroyBuffer)
|
||||
DESTROY64(vkDestroyBufferView)
|
||||
DESTROY64(vkDestroyCommandPool)
|
||||
DESTROY64(vkDestroyDescriptorPool)
|
||||
DESTROY64(vkDestroyDescriptorSetLayout)
|
||||
DESTROY64(vkDestroyDescriptorUpdateTemplate)
|
||||
DESTROY64(vkDestroyDescriptorUpdateTemplateKHR)
|
||||
|
||||
EXPORT void my_vkDestroyDevice(x86emu_t* emu, void* pDevice, my_VkAllocationCallbacks_t* pAllocator)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
my_VkAllocationCallbacks_t my_alloc;
|
||||
my->vkDestroyDevice(pDevice, find_VkAllocationCallbacks(&my_alloc, pAllocator));
|
||||
}
|
||||
|
||||
DESTROY64(vkDestroyEvent)
|
||||
DESTROY64(vkDestroyFence)
|
||||
DESTROY64(vkDestroyFramebuffer)
|
||||
DESTROY64(vkDestroyImage)
|
||||
DESTROY64(vkDestroyImageView)
|
||||
|
||||
EXPORT void my_vkDestroyInstance(x86emu_t* emu, void* instance, my_VkAllocationCallbacks_t* pAllocator)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
my_VkAllocationCallbacks_t my_alloc;
|
||||
my->vkDestroyInstance(instance, find_VkAllocationCallbacks(&my_alloc, pAllocator));
|
||||
}
|
||||
|
||||
DESTROY64(vkDestroyPipeline)
|
||||
DESTROY64(vkDestroyPipelineCache)
|
||||
DESTROY64(vkDestroyPipelineLayout)
|
||||
DESTROY64(vkDestroyQueryPool)
|
||||
DESTROY64(vkDestroyRenderPass)
|
||||
DESTROY64(vkDestroySampler)
|
||||
DESTROY64(vkDestroySamplerYcbcrConversion)
|
||||
DESTROY64(vkDestroySemaphore)
|
||||
DESTROY64(vkDestroyShaderModule)
|
||||
DESTROY64(vkDestroySwapchainKHR)
|
||||
|
||||
DESTROY64(vkFreeMemory)
|
||||
|
||||
CREATE(vkCreateDebugUtilsMessengerEXT)
|
||||
DESTROY(vkDestroyDebugUtilsMessengerEXT)
|
||||
|
||||
DESTROY64(vkDestroySurfaceKHR)
|
||||
|
||||
DESTROY64(vkDestroySamplerYcbcrConversionKHR)
|
||||
|
||||
EXPORT void my_vkGetPhysicalDeviceProperties(x86emu_t* emu, void* device, void* pProps)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
static const char* desc =
|
||||
"uuuuiYB"
|
||||
"SuuuuuuuuuuuUUuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuffuuuffuLUUUiuiuffuuuuiiiiuiiiiiuifuuuuffffffiiUUU"
|
||||
"iiiii";
|
||||
void* my_props = malloc(vkalignSize(desc));
|
||||
my->vkGetPhysicalDeviceProperties(device, my_props);
|
||||
vkunalignStruct(pProps, my_props, desc, 0);
|
||||
}
|
||||
|
||||
EXPORT void my_vkGetPhysicalDeviceSparseImageFormatProperties(x86emu_t* emu, void* device, int format, int type, int samples, int usage, int tiling, uint32_t* count, void** pProps)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
static const char* desc = "iuuui";
|
||||
if(!pProps)
|
||||
return my->vkGetPhysicalDeviceSparseImageFormatProperties(device, format, type, samples, usage, tiling, count, pProps);
|
||||
|
||||
int sz = vkalignSize(desc);
|
||||
uint32_t cnt;
|
||||
my->vkGetPhysicalDeviceSparseImageFormatProperties(device, format, type, samples, usage, tiling, &cnt, NULL);
|
||||
void* my_props = malloc(cnt*sz);
|
||||
my->vkGetPhysicalDeviceSparseImageFormatProperties(device, format, type, samples, usage, tiling, count, my_props);
|
||||
vkunalignStruct(pProps, my_props, desc, cnt);
|
||||
}
|
||||
|
||||
EXPORT void my_vkUpdateDescriptorSets(x86emu_t* emu, void* device, uint32_t writeCount, void* writeSet, uint32_t copyCount, void* copySet)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
static const char* writeDesc = "upUuuuippp";
|
||||
static const char* copyDesc = "upUuuUuuu";
|
||||
|
||||
void* writeAligned = writeCount?vkalignStruct(writeSet, writeDesc, writeCount):NULL; // TODO: Align pNext....
|
||||
void* copyAligned = copyCount?vkalignStruct(copySet, copyDesc, copyCount):NULL; // TODO: Align pNext....
|
||||
my->vkUpdateDescriptorSets(device, writeCount, writeAligned, copyCount, copyAligned);
|
||||
if(writeCount) vkunalignStruct(writeSet, writeAligned, writeDesc, writeCount);
|
||||
if(copyCount) vkunalignStruct(copySet, copyAligned, copyDesc, copyCount);
|
||||
}
|
||||
|
||||
EXPORT int my_vkGetDisplayPlaneCapabilitiesKHR(x86emu_t* emu, void* device, uint64_t mode, uint32_t index, void* pCap)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
static const char* desc = "iuuuuuuuuuuuuuuuu";
|
||||
|
||||
void* aligned = vkalignStruct(pCap, desc, 0);
|
||||
int ret = my->vkGetDisplayPlaneCapabilitiesKHR(device, mode, index, aligned);
|
||||
vkunalignStruct(pCap, aligned, desc, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT int my_vkGetPhysicalDeviceDisplayPropertiesKHR(x86emu_t* emu, void* device, uint32_t* count, void* pProp)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
static const char* desc = "Upuuuuiii";
|
||||
if(!pProp)
|
||||
return my->vkGetPhysicalDeviceDisplayPropertiesKHR(device, count, pProp);
|
||||
|
||||
int32_t cnt = 0;
|
||||
my->vkGetPhysicalDeviceDisplayPropertiesKHR(device, &cnt, NULL);
|
||||
void* aligned = vkalignStruct(pProp, desc, cnt);
|
||||
int ret = my->vkGetPhysicalDeviceDisplayPropertiesKHR(device, count, aligned);
|
||||
vkunalignStruct(pProp, aligned, desc, cnt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT void my_vkGetPhysicalDeviceMemoryProperties(x86emu_t* emu, void* device, void* pProps)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
static const char* desc =
|
||||
"u" //uint32_t memoryTypeCount;
|
||||
"iuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiuiu" //VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]; //32
|
||||
"u" //uint32_t memoryHeapCount;
|
||||
"UiUiUiUiUiUiUiUiUiUiUiUiUiUiUiUi"; //VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]; //16
|
||||
|
||||
void* aligned = vkalignStruct(pProps, desc, 0);
|
||||
my->vkGetPhysicalDeviceMemoryProperties(device, aligned);
|
||||
vkunalignStruct(pProps, aligned, desc, 0);
|
||||
}
|
||||
|
||||
EXPORT void my_vkCmdPipelineBarrier(x86emu_t* emu, void* device, int src, int dst, int dep,
|
||||
uint32_t barrierCount, void* pBarriers, uint32_t bufferCount, void* pBuffers, uint32_t imageCount, void* pImages)
|
||||
{
|
||||
vulkan_my_t* my = (vulkan_my_t*)my_lib->priv.w.p2;
|
||||
static const char* desc = "upiiiiuuUiuuuu";
|
||||
|
||||
void* aligned = (imageCount)?vkalignStruct(pImages, desc, imageCount):NULL;
|
||||
my->vkCmdPipelineBarrier(device, src, dst, dep, barrierCount, pBarriers, bufferCount, pBuffers, imageCount, aligned);
|
||||
if(imageCount) vkunalignStruct(pImages, aligned, desc, imageCount);
|
||||
}
|
||||
Executable
+387
@@ -0,0 +1,387 @@
|
||||
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
|
||||
#error meh!
|
||||
#endif
|
||||
|
||||
//vkDeviceSize == uint64_t
|
||||
//VkImageLayout == enum
|
||||
//VK_DEFINE_NON_DISPATCHABLE_HANDLE == uint64_t !!!!
|
||||
// VkBuffer = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkBufferView = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkCommandPool = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkDescriptorPool = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkDescriptorSet = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkDescriptorSetLayout = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkDescriptorUpdateTemplate = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkDeviceMemory = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkDisplayKHR = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkDisplayModeKHR = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkEvent = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkFence = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkFramebuffer = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkImage = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkImageView = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkPipeline = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkPipelineCache = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkPipelineLayout = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkQueryPool = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkRenderPass = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkSampler = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkSamplerYcbcrConversion = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkSemaphore = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkShaderModule = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkSurfaceKHR = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
// VkSwapchainKHR = VK_DEFINE_NON_DISPATCHABLE_HANDLE
|
||||
|
||||
// P = Vulkan input Param Structure
|
||||
|
||||
// VK_VERSION_1_0
|
||||
GO(vkAllocateCommandBuffers, iFpPp)
|
||||
GO(vkAllocateDescriptorSets, iFpPp)
|
||||
GOM(vkAllocateMemory, iFEpPpp)
|
||||
GO(vkBeginCommandBuffer, iFpP)
|
||||
GO(vkBindBufferMemory, iFpUUU)
|
||||
GO(vkBindImageMemory, iFpUUU)
|
||||
GO(vkCmdBeginQuery, vFpUui)
|
||||
GO(vkCmdBeginRenderPass, vFpPp)
|
||||
GO(vkCmdBindDescriptorSets, vFpiUuupup)
|
||||
GO(vkCmdBindIndexBuffer, vFpUUi)
|
||||
GO(vkCmdBindPipeline, vFppU)
|
||||
GO(vkCmdBindVertexBuffers, vFpuupp)
|
||||
GO(vkCmdBlitImage, vFpUiUiupi)
|
||||
GO(vkCmdClearAttachments, vFpupup)
|
||||
GO(vkCmdClearColorImage, vFpUipup)
|
||||
GO(vkCmdClearDepthStencilImage, vFpUipup)
|
||||
GO(vkCmdCopyBuffer, vFpUUup)
|
||||
GO(vkCmdCopyBufferToImage, vFpUUiup)
|
||||
GO(vkCmdCopyImage, vFpUiUiup)
|
||||
GO(vkCmdCopyImageToBuffer, vFpUiUup)
|
||||
GO(vkCmdCopyQueryPoolResults, vFpUuuUUUi)
|
||||
GO(vkCmdDispatch, vFpuuu)
|
||||
GO(vkCmdDispatchIndirect, vFpUU)
|
||||
GO(vkCmdDraw, vFpuuuu)
|
||||
GO(vkCmdDrawIndexed, vFpuuuiu)
|
||||
GO(vkCmdDrawIndexedIndirect, vFpUUuu)
|
||||
GO(vkCmdDrawIndirect, vFpUUuu)
|
||||
GO(vkCmdEndQuery, vFpUu)
|
||||
GO(vkCmdEndRenderPass, vFp)
|
||||
GO(vkCmdExecuteCommands, vFpup)
|
||||
GO(vkCmdFillBuffer, vFpUUUu)
|
||||
GO(vkCmdNextSubpass, vFpi)
|
||||
GOM(vkCmdPipelineBarrier, vFEpiiiupupup)
|
||||
GO(vkCmdPushConstants, vFpUiuup)
|
||||
GO(vkCmdResetEvent, vFpUi)
|
||||
GO(vkCmdResetQueryPool, vFpUuu)
|
||||
GO(vkCmdResolveImage, vFpUiUiup)
|
||||
GO(vkCmdSetBlendConstants, vFpp)
|
||||
GO(vkCmdSetDepthBias, vFpfff)
|
||||
GO(vkCmdSetDepthBounds, vFpff)
|
||||
GO(vkCmdSetEvent, vFpUi)
|
||||
GO(vkCmdSetLineWidth, vFpf)
|
||||
GO(vkCmdSetScissor, vFpuup)
|
||||
GO(vkCmdSetStencilCompareMask, vFpiu)
|
||||
GO(vkCmdSetStencilReference, vFpiu)
|
||||
GO(vkCmdSetStencilWriteMask, vFpiu)
|
||||
GO(vkCmdSetViewport, vFpuup)
|
||||
GO(vkCmdUpdateBuffer, vFpUUUp)
|
||||
GO(vkCmdWaitEvents, vFpupiiuPuPuP)
|
||||
GO(vkCmdWriteTimestamp, vFpiUu)
|
||||
GOM(vkCreateBuffer, iFEpPpp)
|
||||
GOM(vkCreateBufferView, iFEpPpp)
|
||||
GOM(vkCreateCommandPool, iFEpPpp)
|
||||
GOM(vkCreateComputePipelines, iFEpUuppp)
|
||||
GOM(vkCreateDescriptorPool, iFEpPpp)
|
||||
GOM(vkCreateDescriptorSetLayout, iFEpPpp)
|
||||
GOM(vkCreateDevice, iFEpPpp)
|
||||
GOM(vkCreateEvent, iFEpPpp)
|
||||
GOM(vkCreateFence, iFEpPpp)
|
||||
GOM(vkCreateFramebuffer, iFEpPpp)
|
||||
GOM(vkCreateGraphicsPipelines, iFEpUuppp)
|
||||
GOM(vkCreateImage, iFEpPpp)
|
||||
GOM(vkCreateImageView, iFEpPpp)
|
||||
GOM(vkCreateInstance, iFEPpp)
|
||||
GOM(vkCreatePipelineCache, iFEpPpp)
|
||||
GOM(vkCreatePipelineLayout, iFEpPpp)
|
||||
GOM(vkCreateQueryPool, iFEpPpp)
|
||||
GOM(vkCreateRenderPass, iFEpPpp)
|
||||
GOM(vkCreateSampler, iFEpPpp)
|
||||
GOM(vkCreateSemaphore, iFEpPpp)
|
||||
GOM(vkCreateShaderModule, iFEpPpp)
|
||||
GOM(vkDestroyBuffer, vFEpUp)
|
||||
GOM(vkDestroyBufferView, vFEpUp)
|
||||
GOM(vkDestroyCommandPool, vFEpUp)
|
||||
GOM(vkDestroyDescriptorPool, vFEpUp)
|
||||
GOM(vkDestroyDescriptorSetLayout, vFEpUp)
|
||||
GOM(vkDestroyDevice, vFEpp)
|
||||
GOM(vkDestroyEvent, vFEpUp)
|
||||
GOM(vkDestroyFence, vFEpUp)
|
||||
GOM(vkDestroyFramebuffer, vFEpUp)
|
||||
GOM(vkDestroyImage, vFEpUp)
|
||||
GOM(vkDestroyImageView, vFEpUp)
|
||||
GOM(vkDestroyInstance, vFEpp)
|
||||
GOM(vkDestroyPipeline, vFEpUp)
|
||||
GOM(vkDestroyPipelineCache, vFEpUp)
|
||||
GOM(vkDestroyPipelineLayout, vFEpUp)
|
||||
GOM(vkDestroyQueryPool, vFEpUp)
|
||||
GOM(vkDestroyRenderPass, vFEpUp)
|
||||
GOM(vkDestroySampler, vFEpUp)
|
||||
GOM(vkDestroySemaphore, vFEpUp)
|
||||
GOM(vkDestroyShaderModule, vFEpUp)
|
||||
GO(vkDeviceWaitIdle, iFp)
|
||||
GO(vkEndCommandBuffer, iFp)
|
||||
GO(vkEnumerateDeviceExtensionProperties, iFpppp)
|
||||
GO(vkEnumerateDeviceLayerProperties, iFppp)
|
||||
GO(vkEnumerateInstanceExtensionProperties, iFppp)
|
||||
GO(vkEnumerateInstanceLayerProperties, iFpp)
|
||||
GO(vkEnumeratePhysicalDevices, iFppp)
|
||||
GO(vkFlushMappedMemoryRanges, iFpup) // should wrap the array of VkMappedMemoryRange
|
||||
GO(vkFreeCommandBuffers, vFpUup)
|
||||
GO(vkFreeDescriptorSets, iFpUup)
|
||||
GOM(vkFreeMemory, iFEpUp)
|
||||
GO(vkGetBufferMemoryRequirements, iFpUp)
|
||||
GO(vkGetDeviceMemoryCommitment, vFpUp)
|
||||
GOM(vkGetDeviceProcAddr, pFEpp)
|
||||
GO(vkGetDeviceQueue, vFpuup)
|
||||
GO(vkGetEventStatus, iFpU)
|
||||
GO(vkGetFenceStatus, iFpU)
|
||||
GO(vkGetImageMemoryRequirements, vFpUp)
|
||||
GO(vkGetImageSparseMemoryRequirements, vFpUpp)
|
||||
GO(vkGetImageSubresourceLayout, vFpUpp)
|
||||
GOM(vkGetInstanceProcAddr, pFEpp)
|
||||
GO(vkGetPhysicalDeviceFeatures, vFpp)
|
||||
GO(vkGetPhysicalDeviceFormatProperties, vFpip)
|
||||
GO(vkGetPhysicalDeviceImageFormatProperties, iFpiiiiip) //VkImageFormatProperties sems OK
|
||||
GOM(vkGetPhysicalDeviceMemoryProperties, vFEpp)
|
||||
GOM(vkGetPhysicalDeviceProperties, vFEpp)
|
||||
GO(vkGetPhysicalDeviceQueueFamilyProperties, vFppp) //VkQueueFamilyProperties is OK
|
||||
GOM(vkGetPhysicalDeviceSparseImageFormatProperties, vFEpiiiiipp)
|
||||
GO(vkGetPipelineCacheData, iFpUpp)
|
||||
GO(vkGetQueryPoolResults, iFpUuuLpUi)
|
||||
GO(vkGetRenderAreaGranularity, vFpUp)
|
||||
GO(vkInvalidateMappedMemoryRanges, iFpup) //VkMappedMemoryRange seems OK
|
||||
GO(vkMapMemory, iFpUUUip)
|
||||
GO(vkMergePipelineCaches, iFpUup)
|
||||
GO(vkQueueBindSparse, iFpuPU)
|
||||
GO(vkQueueSubmit, iFpuPU)
|
||||
GO(vkQueueWaitIdle, iFp)
|
||||
GO(vkResetCommandBuffer, iFpi)
|
||||
GO(vkResetCommandPool, iFpUi)
|
||||
GO(vkResetDescriptorPool, iFpUi)
|
||||
GO(vkResetEvent, iFpU)
|
||||
GO(vkResetFences, iFpup)
|
||||
GO(vkSetEvent, iFpU)
|
||||
GO(vkUnmapMemory, vFpU)
|
||||
GOM(vkUpdateDescriptorSets, vFEpupup)
|
||||
GO(vkWaitForFences, iFpupiU)
|
||||
|
||||
// VK_VERSION_1_1
|
||||
GO(vkBindBufferMemory2, iFpuP)
|
||||
GO(vkBindImageMemory2, iFpuP)
|
||||
GO(vkCmdDispatchBase, vFpuuuuuu)
|
||||
GO(vkCmdSetDeviceMask, vFpu)
|
||||
GOM(vkCreateDescriptorUpdateTemplate, iFEpPpp)
|
||||
GOM(vkCreateSamplerYcbcrConversion, iFEpPpp)
|
||||
GOM(vkDestroyDescriptorUpdateTemplate, vFEpUp)
|
||||
GO(vkEnumerateInstanceVersion, iFp)
|
||||
GO(vkEnumeratePhysicalDeviceGroups, iFppp) //VkPhysicalDeviceGroupProperties seems OK
|
||||
GO(vkGetBufferMemoryRequirements2, iFpPP)
|
||||
GO(vkGetImageMemoryRequirements2, vFpPP)
|
||||
GO(vkGetImageSparseMemoryRequirements2, vFpppp)
|
||||
GO(vkGetDescriptorSetLayoutSupport, vFpPp)
|
||||
GO(vkGetDeviceGroupPeerMemoryFeatures, vFpuuup)
|
||||
GO(vkGetDeviceQueue2, vFpPp)
|
||||
GO(vkGetPhysicalDeviceExternalBufferProperties, vFpPP)
|
||||
GO(vkGetPhysicalDeviceExternalFenceProperties, vFpPP)
|
||||
GO(vkGetPhysicalDeviceExternalSemaphoreProperties, vFpPP)
|
||||
GO(vkGetPhysicalDeviceFeatures2, vFpP)
|
||||
GO(vkGetPhysicalDeviceFormatProperties2, vFpiP)
|
||||
GO(vkGetPhysicalDeviceImageFormatProperties2, vFpPP)
|
||||
GO(vkGetPhysicalDeviceMemoryProperties2, vFpP)
|
||||
GO(vkGetPhysicalDeviceProperties2, vFpP)
|
||||
GO(vkGetPhysicalDeviceQueueFamilyProperties2, vFppp) //VkQueueFamilyProperties2 seems OK
|
||||
GO(vkGetPhysicalDeviceSparseImageFormatProperties2, vFpPpp) //VkSparseImageFormatProperties2 seems OK
|
||||
GO(vkUpdateDescriptorSetWithTemplate, vFpUUp)
|
||||
GO(vkTrimCommandPool, vFpUi)
|
||||
|
||||
// VK_VERSION_1_2
|
||||
GO(vkResetQueryPool, vFpUuu)
|
||||
|
||||
// VK_EXT_debug_report
|
||||
//GOM(vkCreateDebugReportCallbackEXT, iFEpppp)
|
||||
GO(vkDebugReportMessageEXT, vFpiiULipp)
|
||||
//GOM(vkDestroyDebugReportCallbackEXT, iFEppp)
|
||||
|
||||
//VK_EXT_debug_utils
|
||||
GO(vkCmdBeginDebugUtilsLabelEXT, vFpp) //TODO: Cehck alignement of this extension
|
||||
GO(vkCmdEndDebugUtilsLabelEXT, vFp)
|
||||
GO(vkCmdInsertDebugUtilsLabelEXT, vFpp)
|
||||
GOM(vkCreateDebugUtilsMessengerEXT, iFEpppp)
|
||||
GOM(vkDestroyDebugUtilsMessengerEXT, vFEppp)
|
||||
GO(vkQueueBeginDebugUtilsLabelEXT, vFpp)
|
||||
GO(vkQueueEndDebugUtilsLabelEXT, vFp)
|
||||
GO(vkQueueInsertDebugUtilsLabelEXT, vFpp)
|
||||
GO(vkSetDebugUtilsObjectNameEXT, iFpp)
|
||||
GO(vkSetDebugUtilsObjectTagEXT, iFpp)
|
||||
//GOM(vkSubmitDebugUtilsMessageEXT, vFEpppp) // callback in last arguments
|
||||
|
||||
// VK_KHR_external_memory_capabilities
|
||||
GO(vkGetPhysicalDeviceExternalBufferPropertiesKHR, vFpPP)
|
||||
|
||||
// VK_KHR_get_physical_device_properties2
|
||||
GO(vkGetPhysicalDeviceFeatures2KHR, vFpP)
|
||||
GO(vkGetPhysicalDeviceFormatProperties2KHR, vFpiP)
|
||||
GO(vkGetPhysicalDeviceImageFormatProperties2KHR, vFpPP)
|
||||
GO(vkGetPhysicalDeviceMemoryProperties2KHR, vFpP)
|
||||
GO(vkGetPhysicalDeviceProperties2KHR, vFpP)
|
||||
GO(vkGetPhysicalDeviceQueueFamilyProperties2KHR, vFppp)
|
||||
GO(vkGetPhysicalDeviceSparseImageFormatProperties2KHR, vFpPpp) //VkSparseImageFormatProperties2 seems OK
|
||||
|
||||
// VK_KHR_get_surface_capabilities2
|
||||
GO(vkGetPhysicalDeviceSurfaceCapabilities2KHR, iFpPP)
|
||||
GO(vkGetPhysicalDeviceSurfaceFormats2KHR, iFpPpp) //VkSurfaceFormat2KHR seems OK (but array)
|
||||
|
||||
// VK_KHR_surface
|
||||
GOM(vkDestroySurfaceKHR, vFEpUp)
|
||||
GO(vkGetPhysicalDeviceSurfaceCapabilitiesKHR, iFpUp) //VkSurfaceCapabilitiesKHR seems OK
|
||||
GO(vkGetPhysicalDeviceSurfaceFormatsKHR, iFpUpp)
|
||||
GO(vkGetPhysicalDeviceSurfacePresentModesKHR, iFpUpp)
|
||||
GO(vkGetPhysicalDeviceSurfaceSupportKHR, iFpuUp)
|
||||
|
||||
// VK_KHR_xcb_surface
|
||||
GOM(vkCreateXcbSurfaceKHR, iFEpPpp)
|
||||
GO(vkGetPhysicalDeviceXcbPresentationSupportKHR, iFpupp)
|
||||
|
||||
// VK_KHR_xlib_surface
|
||||
GOM(vkCreateXlibSurfaceKHR, iFEpPpp)
|
||||
GO(vkGetPhysicalDeviceXlibPresentationSupportKHR, iFpupp)
|
||||
|
||||
// VK_KHR_swapchain
|
||||
GO(vkAcquireNextImageKHR, iFpUUUUp)
|
||||
GO(vkAcquireNextImage2KHR, iFpPp)
|
||||
GOM(vkCreateSwapchainKHR, iFEpPpp)
|
||||
GOM(vkDestroySwapchainKHR, vFEpUp)
|
||||
GO(vkGetDeviceGroupPresentCapabilitiesKHR, iFpP)
|
||||
GO(vkGetDeviceGroupSurfacePresentModesKHR, iFpUp)
|
||||
GO(vkGetPhysicalDevicePresentRectanglesKHR, iFpUpp)
|
||||
GO(vkGetSwapchainImagesKHR, iFpUpp)
|
||||
GO(vkQueuePresentKHR, iFpP)
|
||||
|
||||
// VK_KHR_bind_memory2
|
||||
GO(vkBindBufferMemory2KHR, iFpuP)
|
||||
GO(vkBindImageMemory2KHR, iFpuP)
|
||||
|
||||
// VK_KHR_display
|
||||
GOM(vkCreateDisplayModeKHR, iFEpUPpp)
|
||||
GOM(vkCreateDisplayPlaneSurfaceKHR, iFEpPpp)
|
||||
GO(vkGetDisplayModePropertiesKHR, iFpUpp) //VkDisplayModePropertiesKHR seems OK
|
||||
GOM(vkGetDisplayPlaneCapabilitiesKHR, iFEpUup)
|
||||
GO(vkGetDisplayPlaneSupportedDisplaysKHR, iFpupp)
|
||||
GO(vkGetPhysicalDeviceDisplayPlanePropertiesKHR, iFppp) //VkDisplayPlanePropertiesKHR is OK
|
||||
GOM(vkGetPhysicalDeviceDisplayPropertiesKHR, iFEppp)
|
||||
|
||||
// VK_KHR_descriptor_update_template
|
||||
GOM(vkCreateDescriptorUpdateTemplateKHR, iFEpPpp)
|
||||
GOM(vkDestroyDescriptorUpdateTemplateKHR, vFEpUp)
|
||||
GO(vkUpdateDescriptorSetWithTemplateKHR, vFpUUp)
|
||||
GO(vkCmdPushDescriptorSetWithTemplateKHR, vFpUUup)
|
||||
|
||||
// VK_EXT_display_surface_counter
|
||||
GO(vkGetPhysicalDeviceSurfaceCapabilities2EXT, iFpUP)
|
||||
|
||||
// VK_KHR_get_display_properties2
|
||||
GO(vkGetDisplayModeProperties2KHR, iFpUpp)
|
||||
GO(vkGetDisplayPlaneCapabilities2KHR, iFppp)
|
||||
GO(vkGetPhysicalDeviceDisplayPlaneProperties2KHR, iFppp)
|
||||
GO(vkGetPhysicalDeviceDisplayProperties2KHR, iFppp)
|
||||
|
||||
// VK_KHR_device_group
|
||||
GO(vkCmdDispatchBaseKHR, vFpuuuuuu)
|
||||
GO(vkCmdSetDeviceMaskKHR, vFpu)
|
||||
GO(vkGetDeviceGroupPeerMemoryFeaturesKHR, vFpuuup)
|
||||
|
||||
// VK_KHR_sampler_ycbcr_conversion
|
||||
GOM(vkCreateSamplerYcbcrConversionKHR, iFEpPpp)
|
||||
GOM(vkDestroySamplerYcbcrConversionKHR, vFEpUp)
|
||||
|
||||
// VK_KHR_display_swapchain
|
||||
GOM(vkCreateSharedSwapchainsKHR, iFEpuppp)
|
||||
|
||||
// VK_KHR_wayland_surface
|
||||
GOM(vkCreateWaylandSurfaceKHR, iFEpppp)
|
||||
GO(vkGetPhysicalDeviceWaylandPresentationSupportKHR, iFpup)
|
||||
|
||||
// VK_KHR_device_group_creation
|
||||
GO(vkEnumeratePhysicalDeviceGroupsKHR, iFppp)
|
||||
|
||||
// VK_KHR_get_memory_requirements2
|
||||
GO(vkGetBufferMemoryRequirements2KHR, iFpPP)
|
||||
GO(vkGetImageMemoryRequirements2KHR, vFpPP)
|
||||
GO(vkGetImageSparseMemoryRequirements2KHR, vFpppp)
|
||||
|
||||
// VK_KHR_external_fence_capabilities
|
||||
GO(vkGetPhysicalDeviceExternalFencePropertiesKHR, vFpPP)
|
||||
|
||||
// VK_KHR_external_semaphore_capabilities
|
||||
GO(vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, vFpPP)
|
||||
|
||||
// VK_KHR_maintenance1
|
||||
GO(vkTrimCommandPoolKHR, vFpUi)
|
||||
|
||||
// VK_KHR_maintenance2
|
||||
// no functions
|
||||
|
||||
// VK_KHR_maintenance3
|
||||
GO(vkGetDescriptorSetLayoutSupportKHR, vFpPp)
|
||||
|
||||
// VK_KHR_external_memory_fd
|
||||
GO(vkGetMemoryFdKHR, iFppp)
|
||||
GO(vkGetMemoryFdPropertiesKHR, iFpiip)
|
||||
|
||||
// VK_KHR_dedicated_allocation
|
||||
// no functions
|
||||
|
||||
// VK_KHR_image_format_list
|
||||
// no functions
|
||||
|
||||
// VK_KHR_shader_draw_parameters
|
||||
// no functions
|
||||
|
||||
// VK_EXT_conditional_rendering
|
||||
GO(vkCmdBeginConditionalRenderingEXT, vFpP)
|
||||
GO(vkCmdEndConditionalRenderingEXT, vFp)
|
||||
|
||||
// VK_EXT_depth_clip_enable
|
||||
// no functions
|
||||
|
||||
// VK_EXT_host_query_reset
|
||||
GO(vkResetQueryPoolEXT, vFpUuu)
|
||||
|
||||
// VK_EXT_memory_priority
|
||||
// no functions
|
||||
|
||||
// VK_EXT_shader_demote_to_helper_invocation
|
||||
// no functions
|
||||
|
||||
// VK_EXT_transform_feedback
|
||||
GO(vkCmdBeginQueryIndexedEXT, vFpUuiu)
|
||||
GO(vkCmdBeginTransformFeedbackEXT, vFpuupp)
|
||||
GO(vkCmdBindTransformFeedbackBuffersEXT, vFpuuppp)
|
||||
GO(vkCmdDrawIndirectByteCountEXT, vFpuuUUuu)
|
||||
GO(vkCmdEndQueryIndexedEXT, vFpUuu)
|
||||
GO(vkCmdEndTransformFeedbackEXT, vFpuupp)
|
||||
|
||||
// VK_EXT_vertex_attribute_divisor
|
||||
// no functions
|
||||
|
||||
// VK_EXT_full_screen_exclusive
|
||||
GO(vkAcquireFullScreenExclusiveModeEXT, iFpU)
|
||||
GO(vkGetPhysicalDeviceSurfacePresentModes2EXT, iFpPpp)
|
||||
GO(vkReleaseFullScreenExclusiveModeEXT, iFpU)
|
||||
GO(vkGetDeviceGroupSurfacePresentModes2EXT, iFpPp)
|
||||
|
||||
// VK_EXT_calibrated_timestamps
|
||||
GO(vkGetCalibratedTimestampsEXT, iFpuppp)
|
||||
GO(vkGetPhysicalDeviceCalibrateableTimeDomainsEXT, iFppp)
|
||||
|
||||
// VK_EXT_sample_locations
|
||||
GO(vkCmdSetSampleLocationsEXT, vFpP)
|
||||
GO(vkGetPhysicalDeviceMultisamplePropertiesEXT, vFpiP)
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define _GNU_SOURCE /* See feature_test_macros(7) */
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "wrappedlibs.h"
|
||||
|
||||
#include "wrapper.h"
|
||||
#include "bridge.h"
|
||||
#include "librarian/library_private.h"
|
||||
#include "x86emu.h"
|
||||
|
||||
const char* waylandclientName = "libwayland-client.so.0";
|
||||
#define LIBNAME waylandclient
|
||||
|
||||
#include "wrappedlib_init.h"
|
||||
|
||||
Executable
+76
@@ -0,0 +1,76 @@
|
||||
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
|
||||
#error Meh....
|
||||
#endif
|
||||
|
||||
//GO(wl_array_add,
|
||||
//GO(wl_array_copy,
|
||||
//GO(wl_array_init,
|
||||
//GO(wl_array_release,
|
||||
//GO(wl_display_cancel_read,
|
||||
GO(wl_display_connect, pFp)
|
||||
//GO(wl_display_connect_to_fd,
|
||||
//GO(wl_display_create_queue,
|
||||
//GO(wl_display_disconnect,
|
||||
//GO(wl_display_dispatch,
|
||||
//GO(wl_display_dispatch_pending,
|
||||
//GO(wl_display_dispatch_queue,
|
||||
//GO(wl_display_dispatch_queue_pending,
|
||||
//GO(wl_display_flush,
|
||||
//GO(wl_display_get_error,
|
||||
//GO(wl_display_get_fd,
|
||||
//GO(wl_display_get_protocol_error,
|
||||
//GO(wl_display_prepare_read,
|
||||
//GO(wl_display_prepare_read_queue,
|
||||
//GO(wl_display_read_events,
|
||||
//GO(wl_display_roundtrip,
|
||||
//GO(wl_display_roundtrip_queue,
|
||||
//GO(wl_event_queue_destroy,
|
||||
//GO(wl_list_empty,
|
||||
//GO(wl_list_init,
|
||||
//GO(wl_list_insert,
|
||||
//GO(wl_list_insert_list,
|
||||
//GO(wl_list_length,
|
||||
//GO(wl_list_remove,
|
||||
//GO(wl_log_set_handler_client,
|
||||
//GO(wl_proxy_add_dispatcher,
|
||||
//GO(wl_proxy_add_listener,
|
||||
//GO(wl_proxy_create,
|
||||
//GO(wl_proxy_create_wrapper,
|
||||
//GO(wl_proxy_destroy,
|
||||
//GO(wl_proxy_get_class,
|
||||
//GO(wl_proxy_get_id,
|
||||
//GO(wl_proxy_get_listener,
|
||||
//GO(wl_proxy_get_user_data,
|
||||
//GO(wl_proxy_get_version,
|
||||
//GO(wl_proxy_marshal,
|
||||
//GO(wl_proxy_marshal_array,
|
||||
//GO(wl_proxy_marshal_array_constructor,
|
||||
//GO(wl_proxy_marshal_array_constructor_versioned,
|
||||
//GO(wl_proxy_marshal_constructor,
|
||||
//GO(wl_proxy_marshal_constructor_versioned,
|
||||
//GO(wl_proxy_set_queue,
|
||||
//GO(wl_proxy_set_user_data,
|
||||
//GO(wl_proxy_wrapper_destroy,
|
||||
|
||||
DATA(wl_buffer_interface, 24)
|
||||
DATA(wl_callback_interface, 24)
|
||||
DATA(wl_compositor_interface, 24)
|
||||
DATA(wl_data_device_interface, 24)
|
||||
DATA(wl_data_device_manager_interface, 24)
|
||||
DATA(wl_data_offer_interface, 24)
|
||||
DATA(wl_data_source_interface, 24)
|
||||
DATA(wl_display_interface, 24)
|
||||
DATA(wl_keyboard_interface, 24)
|
||||
DATA(wl_output_interface, 24)
|
||||
DATA(wl_pointer_interface, 24)
|
||||
DATA(wl_region_interface, 24)
|
||||
DATA(wl_registry_interface, 24)
|
||||
DATA(wl_seat_interface, 24)
|
||||
DATA(wl_shell_interface, 24)
|
||||
DATA(wl_shell_surface_interface, 24)
|
||||
DATA(wl_shm_interface, 24)
|
||||
DATA(wl_shm_pool_interface, 24)
|
||||
DATA(wl_subcompositor_interface, 24)
|
||||
DATA(wl_subsurface_interface, 24)
|
||||
DATA(wl_surface_interface, 24)
|
||||
DATA(wl_touch_interface, 24)
|
||||
@@ -1,2 +1,2 @@
|
||||
# /etc/binfmt.d/box86.conf
|
||||
:x86:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/box86:
|
||||
:x86:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:${CMAKE_INSTALL_PREFIX}/bin/${BOX86}:
|
||||
Reference in new issue
Block a user