omdev 0.0.0.dev376__tar.gz → 0.0.0.dev378__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {omdev-0.0.0.dev376/omdev.egg-info → omdev-0.0.0.dev378}/PKG-INFO +2 -2
- omdev-0.0.0.dev378/omdev/capi/darwin/__init__.py +5 -0
- omdev-0.0.0.dev378/omdev/capi/darwin/aps.py +39 -0
- omdev-0.0.0.dev378/omdev/capi/darwin/ax.py +54 -0
- omdev-0.0.0.dev378/omdev/capi/darwin/cf.py +152 -0
- omdev-0.0.0.dev378/omdev/capi/darwin/cg.py +105 -0
- omdev-0.0.0.dev378/omdev/capi/linux/__init__.py +5 -0
- omdev-0.0.0.dev378/omdev/capi/linux/x11.py +107 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/clipboard/darwin_cf.py +8 -116
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/clipboard/linux_x11.py +6 -106
- omdev-0.0.0.dev378/omdev/tools/pawk/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378/omdev.egg-info}/PKG-INFO +2 -2
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev.egg-info/SOURCES.txt +8 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev.egg-info/requires.txt +1 -1
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/pyproject.toml +2 -2
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/LICENSE +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/MANIFEST.in +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/README.md +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/.manifests.json +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/__about__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/gen.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/imports.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/main.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/manifests.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/resources.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/srcfiles.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/strip.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/types.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/amalg/typing.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/compute/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/compute/cache.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/compute/contexts.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/compute/currents.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/compute/fns.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/compute/resolvers.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/compute/storage.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/compute/types.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/data/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/data/actions.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/data/cache.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/data/consts.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/data/defaults.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/data/manifests.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cache/data/specs.py +0 -0
- {omdev-0.0.0.dev376/omdev/cc → omdev-0.0.0.dev378/omdev/capi}/__init__.py +0 -0
- {omdev-0.0.0.dev376/omdev/cexts → omdev-0.0.0.dev378/omdev/cc}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cc/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cc/cdeps.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cc/cdeps.toml +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cc/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cc/srclangs.py +0 -0
- {omdev-0.0.0.dev376/omdev/ci/docker → omdev-0.0.0.dev378/omdev/cexts}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_boilerplate.cc +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/LICENSE +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/build_ext.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/compilers/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/compilers/ccompiler.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/compilers/options.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/compilers/unixccompiler.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/dir_util.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/errors.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/extension.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/file_util.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/modified.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/spawn.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/sysconfig.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/util.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/_distutils/version.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/build.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/cmake.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/importhook.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/magic.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cexts/scan.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/cache.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/ci.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/compose.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/consts.py +0 -0
- {omdev-0.0.0.dev376/omdev/ci/docker/cacheserved → omdev-0.0.0.dev378/omdev/ci/docker}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/buildcaching.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/cache.py +0 -0
- {omdev-0.0.0.dev376/omdev/ci/github → omdev-0.0.0.dev378/omdev/ci/docker/cacheserved}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/cacheserved/cache.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/cacheserved/manifests.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/cmds.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/dataserver.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/imagepulling.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/inject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/packing.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/repositories.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/docker/utils.py +0 -0
- {omdev-0.0.0.dev376/omdev/ci/github/api → omdev-0.0.0.dev378/omdev/ci/github}/__init__.py +0 -0
- {omdev-0.0.0.dev376/omdev/ci/github/api/v1 → omdev-0.0.0.dev378/omdev/ci/github/api}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/api/clients.py +0 -0
- {omdev-0.0.0.dev376/omdev/ci/github/api/v2 → omdev-0.0.0.dev378/omdev/ci/github/api/v1}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/api/v1/api.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/api/v1/client.py +0 -0
- {omdev-0.0.0.dev376/omdev/clipboard → omdev-0.0.0.dev378/omdev/ci/github/api/v2}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/api/v2/api.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/api/v2/azure.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/api/v2/client.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/bootstrap.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/cache.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/env.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/github/inject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/inject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/requirements.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/shell.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ci/utils.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cli/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cli/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cli/_pathhack.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cli/clicli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cli/install.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cli/main.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cli/managers.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cli/types.py +0 -0
- {omdev-0.0.0.dev376/omdev/git → omdev-0.0.0.dev378/omdev/clipboard}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/clipboard/clipboard.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cmake.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cmdlog/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cmdlog/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cmdlog/_cmdlog.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cmdlog/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/cmdlog/cmdlog.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/dataserver/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/dataserver/handlers.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/dataserver/http.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/dataserver/routes.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/dataserver/server.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/dataserver/targets.py +0 -0
- {omdev-0.0.0.dev376/omdev/home → omdev-0.0.0.dev378/omdev/git}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/git/magic.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/git/revisions.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/git/shallow.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/git/status.py +0 -0
- {omdev-0.0.0.dev376/omdev/interp/providers → omdev-0.0.0.dev378/omdev/home}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/home/paths.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/home/secrets.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/home/shadow.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/imgur.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/intellij/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/intellij/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/intellij/ides.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/intellij/open.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/default.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/inject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/inspect.py +0 -0
- {omdev-0.0.0.dev376/omdev/interp/pyenv → omdev-0.0.0.dev378/omdev/interp/providers}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/providers/base.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/providers/inject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/providers/running.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/providers/standalone.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/providers/system.py +0 -0
- {omdev-0.0.0.dev376/omdev/interp/uv → omdev-0.0.0.dev378/omdev/interp/pyenv}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/pyenv/inject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/pyenv/install.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/pyenv/provider.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/pyenv/pyenv.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/resolvers.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/types.py +0 -0
- {omdev-0.0.0.dev376/omdev/mypy → omdev-0.0.0.dev378/omdev/interp/uv}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/uv/inject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/uv/provider.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/uv/uv.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/interp/venvs.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/magic/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/magic/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/magic/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/magic/find.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/magic/magic.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/magic/prepare.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/magic/styles.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/manifests/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/manifests/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/manifests/build.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/manifests/dumping.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/manifests/main.py +0 -0
- {omdev-0.0.0.dev376/omdev/oci → omdev-0.0.0.dev378/omdev/mypy}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/mypy/debug.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/mypy/report.py +0 -0
- {omdev-0.0.0.dev376/omdev/oci/pack → omdev-0.0.0.dev378/omdev/oci}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/building.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/compression.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/data.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/datarefs.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/dataserver.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/loading.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/media.py +0 -0
- {omdev-0.0.0.dev376/omdev/packaging → omdev-0.0.0.dev378/omdev/oci/pack}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/pack/packing.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/pack/repositories.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/pack/unpacking.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/repositories.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/oci/tars.py +0 -0
- {omdev-0.0.0.dev376/omdev/precheck → omdev-0.0.0.dev378/omdev/packaging}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/packaging/marshal.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/packaging/names.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/packaging/requires.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/packaging/revisions.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/packaging/specifiers.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/packaging/versions.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/packaging/wheelfile.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pip.py +0 -0
- {omdev-0.0.0.dev376/omdev/ptk/apps → omdev-0.0.0.dev378/omdev/precheck}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/base.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/caches.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/git.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/imports.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/lite.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/main.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/manifests.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/scripts.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/precheck/unicode.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/__init__.py +0 -0
- {omdev-0.0.0.dev376/omdev/py/scripts → omdev-0.0.0.dev378/omdev/ptk/apps}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/apps/ncdu.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/confirm.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/LICENSE +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/border.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/markdown.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/parser.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/styles.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/tags.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/ptk/markdown/utils.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/attrdocs.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/bracepy.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/classdot.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/LICENSE +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/attrdoc.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/common.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/epydoc.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/google.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/numpydoc.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/parser.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/docstrings/rest.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/findimports.py +0 -0
- {omdev-0.0.0.dev376/omdev/py/tools → omdev-0.0.0.dev378/omdev/py/scripts}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/scripts/bumpversion.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/scripts/execstat.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/scripts/importtrace.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/srcheaders.py +0 -0
- {omdev-0.0.0.dev376/omdev/pyproject/resources → omdev-0.0.0.dev378/omdev/py/tools}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/tools/importscan.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/py/tools/mkrelimp.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/cexts.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/configs.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/inject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/pkg.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/reqs.py +0 -0
- {omdev-0.0.0.dev376/omdev/tokens → omdev-0.0.0.dev378/omdev/pyproject/resources}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/resources/docker-dev.sh +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/resources/python.sh +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/pyproject/venvs.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/scripts/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/scripts/ci.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/scripts/interp.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/scripts/pyproject.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/scripts/slowcat.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/scripts/tmpexec.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tagstrings.py +0 -0
- {omdev-0.0.0.dev376/omdev/tools/antlr → omdev-0.0.0.dev378/omdev/tokens}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tokens/all.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tokens/tokenizert.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tokens/utils.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/__init__.py +0 -0
- {omdev-0.0.0.dev376/omdev/tools/git → omdev-0.0.0.dev378/omdev/tools/antlr}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/antlr/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/antlr/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/antlr/consts.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/antlr/gen.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/cloc.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/diff.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/doc.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/docker.py +0 -0
- {omdev-0.0.0.dev376/omdev/tools/json → omdev-0.0.0.dev378/omdev/tools/git}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/git/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/git/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/git/consts.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/git/messages.py +0 -0
- {omdev-0.0.0.dev376/omdev/tools/jsonview → omdev-0.0.0.dev378/omdev/tools/json}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/json/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/json/cli.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/json/formats.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/json/io.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/json/parsing.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/json/processing.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/json/rendering.py +0 -0
- {omdev-0.0.0.dev376/omdev/tools/jsonview/resources → omdev-0.0.0.dev378/omdev/tools/jsonview}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/jsonview/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/jsonview/cli.py +0 -0
- {omdev-0.0.0.dev376/omdev/tools/pawk → omdev-0.0.0.dev378/omdev/tools/jsonview/resources}/__init__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/jsonview/resources/jsonview.css +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/jsonview/resources/jsonview.js +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/linehisto.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/mkenv.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/notebook.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/pawk/__main__.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/pawk/pawk.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/pip.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/prof.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/qr.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/shadow.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/shell.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev/tools/sqlrepl.py +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev.egg-info/dependency_links.txt +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev.egg-info/entry_points.txt +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/omdev.egg-info/top_level.txt +0 -0
- {omdev-0.0.0.dev376 → omdev-0.0.0.dev378}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: omdev
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev378
|
4
4
|
Summary: omdev
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.13
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omlish==0.0.0.dev378
|
16
16
|
Provides-Extra: all
|
17
17
|
Requires-Dist: black~=25.1; extra == "all"
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import ctypes as ct
|
2
|
+
import ctypes.util
|
3
|
+
import typing as ta
|
4
|
+
|
5
|
+
from omlish import check
|
6
|
+
|
7
|
+
from . import cf
|
8
|
+
|
9
|
+
|
10
|
+
##
|
11
|
+
|
12
|
+
|
13
|
+
aps = ct.cdll.LoadLibrary(check.not_none(ct.util.find_library('ApplicationServices')))
|
14
|
+
|
15
|
+
|
16
|
+
OSStatus: ta.TypeAlias = ct.c_int32
|
17
|
+
|
18
|
+
PasteboardItemID: ta.TypeAlias = ct.c_ulong
|
19
|
+
PasteboardRef: ta.TypeAlias = ct.c_void_p
|
20
|
+
|
21
|
+
PasteboardCopyItemFlavorData = aps.PasteboardCopyItemFlavorData
|
22
|
+
PasteboardCopyItemFlavorData.argtypes = [PasteboardRef, PasteboardItemID, cf.CFStringRef, ct.POINTER(cf.CFDataRef)]
|
23
|
+
PasteboardCopyItemFlavorData.restype = OSStatus
|
24
|
+
|
25
|
+
PasteboardCopyItemFlavors = aps.PasteboardCopyItemFlavors
|
26
|
+
PasteboardCopyItemFlavors.argtypes = [PasteboardRef, PasteboardItemID, ct.POINTER(cf.CFArrayRef)]
|
27
|
+
PasteboardCopyItemFlavors.restype = OSStatus
|
28
|
+
|
29
|
+
PasteboardCreate = aps.PasteboardCreate
|
30
|
+
PasteboardCreate.argtypes = [cf.CFStringRef, ct.POINTER(PasteboardRef)]
|
31
|
+
PasteboardCreate.restype = OSStatus
|
32
|
+
|
33
|
+
PasteboardGetItemCount = aps.PasteboardGetItemCount
|
34
|
+
PasteboardGetItemCount.argtypes = [PasteboardRef, ct.POINTER(ct.c_ulong)]
|
35
|
+
PasteboardGetItemCount.restype = OSStatus
|
36
|
+
|
37
|
+
PasteboardGetItemIdentifier = aps.PasteboardGetItemIdentifier
|
38
|
+
PasteboardGetItemIdentifier.argtypes = [PasteboardRef, ct.c_ulong, ct.POINTER(PasteboardItemID)]
|
39
|
+
PasteboardGetItemIdentifier.restype = OSStatus
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import ctypes as ct
|
2
|
+
|
3
|
+
|
4
|
+
##
|
5
|
+
|
6
|
+
|
7
|
+
ax = ct.CDLL('/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices') # noqa
|
8
|
+
|
9
|
+
|
10
|
+
# AXUIElementCreateApplication(pid_t pid)
|
11
|
+
AXUIElementCreateApplication = ax.AXUIElementCreateApplication
|
12
|
+
AXUIElementCreateApplication.argtypes = [ct.c_int]
|
13
|
+
AXUIElementCreateApplication.restype = ct.c_void_p
|
14
|
+
|
15
|
+
# AXUIElementSetAttributeValue(AXUIElementRef element, CFStringRef attr, CFTypeRef value)
|
16
|
+
AXUIElementSetAttributeValue = ax.AXUIElementSetAttributeValue
|
17
|
+
AXUIElementSetAttributeValue.argtypes = [ct.c_void_p, ct.c_void_p, ct.c_void_p]
|
18
|
+
AXUIElementSetAttributeValue.restype = ct.c_int
|
19
|
+
|
20
|
+
# AXUIElementCopyAttributeValue(AXUIElementRef element, CFStringRef attr, CFTypeRef *value)
|
21
|
+
AXUIElementCopyAttributeValue = ax.AXUIElementCopyAttributeValue
|
22
|
+
AXUIElementCopyAttributeValue.argtypes = [ct.c_void_p, ct.c_void_p, ct.POINTER(ct.c_void_p)]
|
23
|
+
AXUIElementCopyAttributeValue.restype = ct.c_int
|
24
|
+
|
25
|
+
# AXValueCreate functions
|
26
|
+
AXValueCreate = ax.AXValueCreate
|
27
|
+
AXValueCreate.argtypes = [ct.c_int, ct.c_void_p]
|
28
|
+
AXValueCreate.restype = ct.c_void_p
|
29
|
+
|
30
|
+
# AXValueGetValue - extract data from AXValue objects
|
31
|
+
AXValueGetValue = ax.AXValueGetValue
|
32
|
+
AXValueGetValue.argtypes = [ct.c_void_p, ct.c_int, ct.c_void_p]
|
33
|
+
AXValueGetValue.restype = ct.c_bool
|
34
|
+
|
35
|
+
# AX value types
|
36
|
+
kAXValueCGPointType = 1 # noqa
|
37
|
+
kAXValueCGSizeType = 2 # noqa
|
38
|
+
|
39
|
+
# Accessibility permissions checking
|
40
|
+
AXIsProcessTrusted = ax.AXIsProcessTrusted
|
41
|
+
AXIsProcessTrusted.argtypes = []
|
42
|
+
AXIsProcessTrusted.restype = ct.c_bool
|
43
|
+
|
44
|
+
AXIsProcessTrustedWithOptions = ax.AXIsProcessTrustedWithOptions
|
45
|
+
AXIsProcessTrustedWithOptions.argtypes = [ct.c_void_p]
|
46
|
+
AXIsProcessTrustedWithOptions.restype = ct.c_bool
|
47
|
+
|
48
|
+
AXUIElementCopyAttributeNames = ax.AXUIElementCopyAttributeNames
|
49
|
+
AXUIElementCopyAttributeNames.argtypes = [ct.c_void_p, ct.POINTER(ct.c_void_p)]
|
50
|
+
AXUIElementCopyAttributeNames.restype = ct.c_int
|
51
|
+
|
52
|
+
AXUIElementGetAttributeValueCount = ax.AXUIElementGetAttributeValueCount
|
53
|
+
AXUIElementGetAttributeValueCount.argtypes = [ct.c_void_p, ct.c_void_p, ct.POINTER(ct.c_long)]
|
54
|
+
AXUIElementGetAttributeValueCount.restype = ct.c_int
|
@@ -0,0 +1,152 @@
|
|
1
|
+
import contextlib
|
2
|
+
import ctypes as ct
|
3
|
+
import ctypes.util
|
4
|
+
import typing as ta
|
5
|
+
|
6
|
+
|
7
|
+
T = ta.TypeVar('T')
|
8
|
+
|
9
|
+
|
10
|
+
##
|
11
|
+
|
12
|
+
|
13
|
+
cf = ct.CDLL(ct.util.find_library('CoreFoundation'))
|
14
|
+
|
15
|
+
|
16
|
+
##
|
17
|
+
# type aliases
|
18
|
+
|
19
|
+
CFArrayRef: ta.TypeAlias = ct.c_void_p
|
20
|
+
CFDataRef: ta.TypeAlias = ct.c_void_p
|
21
|
+
CFIndex: ta.TypeAlias = ct.c_long
|
22
|
+
CFStringEncoding: ta.TypeAlias = ct.c_uint32
|
23
|
+
CFStringRef: ta.TypeAlias = ct.c_void_p
|
24
|
+
CFTypeID: ta.TypeAlias = ct.c_ulong
|
25
|
+
|
26
|
+
##
|
27
|
+
# ref counts
|
28
|
+
|
29
|
+
CFRetain = cf.CFRetain
|
30
|
+
CFRetain.argtypes = [ct.c_void_p]
|
31
|
+
CFRetain.restype = ct.c_void_p
|
32
|
+
|
33
|
+
# void CFRelease(CFTypeRef cf)
|
34
|
+
CFRelease = cf.CFRelease
|
35
|
+
CFRelease.argtypes = [ct.c_void_p]
|
36
|
+
CFRelease.restype = None
|
37
|
+
|
38
|
+
##
|
39
|
+
# arrays
|
40
|
+
|
41
|
+
# CFIndex CFArrayGetCount(CFArrayRef theArray)
|
42
|
+
CFArrayGetCount = cf.CFArrayGetCount
|
43
|
+
CFArrayGetCount.argtypes = [CFArrayRef]
|
44
|
+
CFArrayGetCount.restype = CFIndex
|
45
|
+
|
46
|
+
# const void *CFArrayGetValueAtIndex(CFArrayRef theArray, CFIndex idx)
|
47
|
+
CFArrayGetValueAtIndex = cf.CFArrayGetValueAtIndex
|
48
|
+
CFArrayGetValueAtIndex.argtypes = [CFArrayRef, CFIndex]
|
49
|
+
CFArrayGetValueAtIndex.restype = CFStringRef
|
50
|
+
|
51
|
+
##
|
52
|
+
# dicts
|
53
|
+
|
54
|
+
# const void *CFDictionaryGetValue(CFDictionaryRef theDict, const void *key)
|
55
|
+
CFDictionaryGetValue = cf.CFDictionaryGetValue
|
56
|
+
CFDictionaryGetValue.argtypes = [ct.c_void_p, ct.c_void_p]
|
57
|
+
CFDictionaryGetValue.restype = ct.c_void_p
|
58
|
+
|
59
|
+
##
|
60
|
+
# strings
|
61
|
+
|
62
|
+
kCFStringEncodingUTF8 = 0x08000100 # noqa
|
63
|
+
|
64
|
+
# CFStringRef CFStringCreateWithCString(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding)
|
65
|
+
CFStringCreateWithCString = cf.CFStringCreateWithCString
|
66
|
+
CFStringCreateWithCString.argtypes = [ct.c_void_p, ct.c_char_p, ct.c_uint32]
|
67
|
+
CFStringCreateWithCString.restype = CFStringRef
|
68
|
+
|
69
|
+
# Boolean CFStringGetCString(CFStringRef theString, char *buffer, CFIndex bufferSize, CFStringEncoding encoding)
|
70
|
+
CFStringGetCString = cf.CFStringGetCString
|
71
|
+
CFStringGetCString.argtypes = [CFStringRef, ct.c_char_p, ct.c_long, ct.c_uint32]
|
72
|
+
CFStringGetCString.restype = ct.c_bool
|
73
|
+
|
74
|
+
CFStringGetLength = cf.CFStringGetLength
|
75
|
+
CFStringGetLength.argtypes = [CFStringRef]
|
76
|
+
CFStringGetLength.restype = CFIndex
|
77
|
+
|
78
|
+
CFStringGetMaximumSizeForEncoding = cf.CFStringGetMaximumSizeForEncoding
|
79
|
+
CFStringGetMaximumSizeForEncoding.argtypes = [CFIndex, CFStringEncoding]
|
80
|
+
CFStringGetMaximumSizeForEncoding.restype = CFIndex
|
81
|
+
|
82
|
+
CFStringGetTypeID = cf.CFStringGetTypeID
|
83
|
+
CFStringGetTypeID.argtypes = []
|
84
|
+
CFStringGetTypeID.restype = CFTypeID
|
85
|
+
|
86
|
+
##
|
87
|
+
# numbers
|
88
|
+
|
89
|
+
kCFNumberIntType = 9 # noqa
|
90
|
+
kCFNumberCGFloatType = 16 # noqa
|
91
|
+
|
92
|
+
# Boolean CFNumberGetValue(CFNumberRef number, CFNumberType theType, void *valuePtr)
|
93
|
+
CFNumberGetValue = cf.CFNumberGetValue
|
94
|
+
CFNumberGetValue.argtypes = [ct.c_void_p, ct.c_int, ct.c_void_p]
|
95
|
+
CFNumberGetValue.restype = ct.c_bool
|
96
|
+
|
97
|
+
##
|
98
|
+
# other
|
99
|
+
|
100
|
+
CFDataGetBytePtr = cf.CFDataGetBytePtr
|
101
|
+
CFDataGetBytePtr.argtypes = [CFDataRef]
|
102
|
+
CFDataGetBytePtr.restype = ct.POINTER(ct.c_uint8)
|
103
|
+
|
104
|
+
CFDataGetLength = cf.CFDataGetLength
|
105
|
+
CFDataGetLength.argtypes = [CFDataRef]
|
106
|
+
CFDataGetLength.restype = CFIndex
|
107
|
+
|
108
|
+
CFGetTypeID = cf.CFGetTypeID
|
109
|
+
CFGetTypeID.argtypes = [ct.c_void_p]
|
110
|
+
CFGetTypeID.restype = CFTypeID
|
111
|
+
|
112
|
+
|
113
|
+
##
|
114
|
+
|
115
|
+
|
116
|
+
def es_release(es: contextlib.ExitStack, p: T) -> T:
|
117
|
+
if p:
|
118
|
+
es.callback(CFRelease, p)
|
119
|
+
return p
|
120
|
+
|
121
|
+
|
122
|
+
#
|
123
|
+
|
124
|
+
|
125
|
+
def string(s: ta.Any, encoding: ta.Any = None) -> CFStringRef:
|
126
|
+
if isinstance(s, str) and encoding is None:
|
127
|
+
s = s.encode('utf-8')
|
128
|
+
encoding = kCFStringEncodingUTF8
|
129
|
+
elif encoding is None:
|
130
|
+
encoding = kCFStringEncodingUTF8
|
131
|
+
return CFStringCreateWithCString(None, s, encoding)
|
132
|
+
|
133
|
+
|
134
|
+
def es_string(es: contextlib.ExitStack, s: ta.Any, encoding: ta.Any = None) -> CFStringRef:
|
135
|
+
p = string(s, encoding)
|
136
|
+
es_release(es, p)
|
137
|
+
return p
|
138
|
+
|
139
|
+
|
140
|
+
def read_string(p: CFStringRef) -> str | None:
|
141
|
+
if not p:
|
142
|
+
return None
|
143
|
+
|
144
|
+
sz = cf.CFStringGetLength(p)
|
145
|
+
max_sz = cf.CFStringGetMaximumSizeForEncoding(sz, kCFStringEncodingUTF8) + 1
|
146
|
+
buf = ct.create_string_buffer(max_sz)
|
147
|
+
|
148
|
+
rc = cf.CFStringGetCString(p, buf, max_sz, kCFStringEncodingUTF8)
|
149
|
+
if not rc:
|
150
|
+
return None
|
151
|
+
|
152
|
+
return buf.value.decode('utf-8')
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import ctypes as ct
|
2
|
+
import ctypes.util
|
3
|
+
|
4
|
+
|
5
|
+
##
|
6
|
+
|
7
|
+
|
8
|
+
cg = ct.CDLL(ct.util.find_library('CoreGraphics'))
|
9
|
+
|
10
|
+
|
11
|
+
# Define constants (from CGWindow.h)
|
12
|
+
kCGWindowListExcludeDesktopElements = 1 << 4 # 16 # noqa
|
13
|
+
kCGWindowListOptionOnScreenOnly = 1 << 0 # 1 # noqa
|
14
|
+
kCGNullWindowID = 0 # noqa
|
15
|
+
|
16
|
+
# Define Core Foundation string constants. These are defined as extern const CFStringRef in the headers.
|
17
|
+
kCGWindowNumber = ct.c_char_p(b"kCGWindowNumber") # noqa
|
18
|
+
kCGWindowOwnerName = ct.c_char_p(b"kCGWindowOwnerName") # noqa
|
19
|
+
kCGWindowName = ct.c_char_p(b"kCGWindowName") # noqa
|
20
|
+
kCGWindowBounds = ct.c_char_p(b"kCGWindowBounds") # noqa
|
21
|
+
kCGWindowOwnerPID = ct.c_char_p(b"kCGWindowOwnerPID") # noqa
|
22
|
+
|
23
|
+
# CFArrayRef CGWindowListCopyWindowInfo(CGWindowListOption option, CGWindowID relativeToWindow)
|
24
|
+
CGWindowListCopyWindowInfo = cg.CGWindowListCopyWindowInfo
|
25
|
+
CGWindowListCopyWindowInfo.argtypes = [ct.c_uint32, ct.c_uint32]
|
26
|
+
CGWindowListCopyWindowInfo.restype = ct.c_void_p
|
27
|
+
|
28
|
+
# CGPreflightScreenCaptureAccess() - available on macOS 10.15+
|
29
|
+
CGPreflightScreenCaptureAccess = cg.CGPreflightScreenCaptureAccess
|
30
|
+
CGPreflightScreenCaptureAccess.argtypes = []
|
31
|
+
CGPreflightScreenCaptureAccess.restype = ct.c_bool
|
32
|
+
|
33
|
+
CGWindowListCreateImage = cg.CGWindowListCreateImage
|
34
|
+
CGWindowListCreateImage.argtypes = [ct.c_void_p, ct.c_uint32, ct.c_uint32, ct.c_uint32]
|
35
|
+
CGWindowListCreateImage.restype = ct.c_void_p
|
36
|
+
|
37
|
+
# CGMainDisplayID() - get the main display
|
38
|
+
CGMainDisplayID = cg.CGMainDisplayID
|
39
|
+
CGMainDisplayID.argtypes = []
|
40
|
+
CGMainDisplayID.restype = ct.c_uint32
|
41
|
+
|
42
|
+
|
43
|
+
# Define CGRect structure
|
44
|
+
class CGRect(ct.Structure):
|
45
|
+
_fields_ = (
|
46
|
+
('origin_x', ct.c_double),
|
47
|
+
('origin_y', ct.c_double),
|
48
|
+
('size_width', ct.c_double),
|
49
|
+
('size_height', ct.c_double),
|
50
|
+
)
|
51
|
+
|
52
|
+
|
53
|
+
# CGDisplayBounds(CGDirectDisplayID display) - get display bounds
|
54
|
+
CGDisplayBounds = cg.CGDisplayBounds
|
55
|
+
CGDisplayBounds.argtypes = [ct.c_uint32]
|
56
|
+
CGDisplayBounds.restype = CGRect
|
57
|
+
|
58
|
+
# Get process PID from window number - we'll use GetWindowProperty or similar
|
59
|
+
CGWindowListCopyWindowInfo = cg.CGWindowListCopyWindowInfo
|
60
|
+
CGWindowListCopyWindowInfo.argtypes = [ct.c_uint32, ct.c_uint32]
|
61
|
+
CGWindowListCopyWindowInfo.restype = ct.c_void_p
|
62
|
+
|
63
|
+
|
64
|
+
# Define CGPoint and CGSize structures for Accessibility API
|
65
|
+
class CGPoint(ct.Structure):
|
66
|
+
_fields_ = (
|
67
|
+
('x', ct.c_double),
|
68
|
+
('y', ct.c_double),
|
69
|
+
)
|
70
|
+
|
71
|
+
|
72
|
+
class CGSize(ct.Structure):
|
73
|
+
_fields_ = (
|
74
|
+
('width', ct.c_double),
|
75
|
+
('height', ct.c_double),
|
76
|
+
)
|
77
|
+
|
78
|
+
|
79
|
+
# CoreGraphics functions for mouse events
|
80
|
+
CGEventCreateMouseEvent = cg.CGEventCreateMouseEvent
|
81
|
+
CGEventCreateMouseEvent.argtypes = [ct.c_void_p, ct.c_uint32, CGPoint, ct.c_uint32]
|
82
|
+
CGEventCreateMouseEvent.restype = ct.c_void_p
|
83
|
+
|
84
|
+
CGEventPost = cg.CGEventPost
|
85
|
+
CGEventPost.argtypes = [ct.c_uint32, ct.c_void_p]
|
86
|
+
CGEventPost.restype = None
|
87
|
+
|
88
|
+
CGEventSetType = cg.CGEventSetType
|
89
|
+
CGEventSetType.argtypes = [ct.c_void_p, ct.c_uint32]
|
90
|
+
CGEventSetType.restype = None
|
91
|
+
|
92
|
+
# Mouse event types
|
93
|
+
kCGEventLeftMouseDown = 1 # noqa
|
94
|
+
kCGEventLeftMouseUp = 2 # noqa
|
95
|
+
kCGEventRightMouseDown = 3 # noqa
|
96
|
+
kCGEventRightMouseUp = 4 # noqa
|
97
|
+
kCGEventMouseMoved = 5 # noqa
|
98
|
+
kCGHIDEventTap = 0 # noqa
|
99
|
+
|
100
|
+
# Event tap locations
|
101
|
+
kCGSessionEventTap = 1 # noqa
|
102
|
+
|
103
|
+
# Mouse button constants
|
104
|
+
kCGMouseButtonLeft = 0 # noqa
|
105
|
+
kCGMouseButtonRight = 1 # noqa
|
@@ -0,0 +1,107 @@
|
|
1
|
+
import ctypes as ct
|
2
|
+
import ctypes.util
|
3
|
+
import typing as ta
|
4
|
+
|
5
|
+
|
6
|
+
##
|
7
|
+
|
8
|
+
|
9
|
+
x11 = ct.CDLL(ct.util.find_library('X11'))
|
10
|
+
|
11
|
+
|
12
|
+
Atom: ta.TypeAlias = ct.c_ulong
|
13
|
+
Bool: ta.TypeAlias = ct.c_int
|
14
|
+
Display: ta.TypeAlias = ct.c_void_p
|
15
|
+
Status: ta.TypeAlias = ct.c_int
|
16
|
+
Time: ta.TypeAlias = ct.c_ulong
|
17
|
+
Window: ta.TypeAlias = ct.c_ulong
|
18
|
+
|
19
|
+
|
20
|
+
class XEvent(ct.Structure):
|
21
|
+
_fields_ = (
|
22
|
+
('type', ct.c_int),
|
23
|
+
('xselection', ct.c_ulong * 24), # noqa
|
24
|
+
)
|
25
|
+
|
26
|
+
|
27
|
+
XCloseDisplay = x11.XCloseDisplay
|
28
|
+
XCloseDisplay.argtypes = [Display]
|
29
|
+
XCloseDisplay.restype = None
|
30
|
+
|
31
|
+
XConvertSelection = x11.XConvertSelection
|
32
|
+
XConvertSelection.argtypes = [Display, Atom, Atom, Atom, Window, Time]
|
33
|
+
XConvertSelection.restype = None
|
34
|
+
|
35
|
+
XCreateSimpleWindow = x11.XCreateSimpleWindow
|
36
|
+
XCreateSimpleWindow.argtypes = [
|
37
|
+
Display,
|
38
|
+
Window,
|
39
|
+
ct.c_int,
|
40
|
+
ct.c_int,
|
41
|
+
ct.c_uint,
|
42
|
+
ct.c_uint,
|
43
|
+
ct.c_uint,
|
44
|
+
ct.c_ulong,
|
45
|
+
ct.c_ulong,
|
46
|
+
]
|
47
|
+
XCreateSimpleWindow.restype = Window
|
48
|
+
|
49
|
+
XDefaultScreen = x11.XDefaultScreen
|
50
|
+
XDefaultScreen.argtypes = [Display]
|
51
|
+
XDefaultScreen.restype = ct.c_int
|
52
|
+
|
53
|
+
XDestroyWindow = x11.XDestroyWindow
|
54
|
+
XDestroyWindow.argtypes = [Display, Window]
|
55
|
+
XDestroyWindow.restype = None
|
56
|
+
|
57
|
+
XFlush = x11.XFlush
|
58
|
+
XFlush.argtypes = [Display]
|
59
|
+
XFlush.restype = None
|
60
|
+
|
61
|
+
XFree = x11.XFree
|
62
|
+
XFree.argtypes = [ct.c_void_p]
|
63
|
+
XFree.restype = None
|
64
|
+
|
65
|
+
XGetWindowProperty = x11.XGetWindowProperty
|
66
|
+
XGetWindowProperty.argtypes = [
|
67
|
+
Display,
|
68
|
+
Window,
|
69
|
+
Atom,
|
70
|
+
ct.c_long,
|
71
|
+
ct.c_long,
|
72
|
+
Bool,
|
73
|
+
Atom,
|
74
|
+
ct.POINTER(Atom),
|
75
|
+
ct.POINTER(ct.c_int),
|
76
|
+
ct.POINTER(ct.c_ulong),
|
77
|
+
ct.POINTER(ct.c_ulong),
|
78
|
+
ct.POINTER(ct.c_void_p),
|
79
|
+
]
|
80
|
+
XGetWindowProperty.restype = Status
|
81
|
+
|
82
|
+
XInternAtom = x11.XInternAtom
|
83
|
+
XInternAtom.argtypes = [Display, ct.c_char_p, Bool]
|
84
|
+
XInternAtom.restype = Atom
|
85
|
+
|
86
|
+
XNextEvent = x11.XNextEvent
|
87
|
+
XNextEvent.argtypes = [Display, ct.POINTER(XEvent)]
|
88
|
+
XNextEvent.restype = None
|
89
|
+
|
90
|
+
XOpenDisplay = x11.XOpenDisplay
|
91
|
+
XOpenDisplay.argtypes = [ct.c_char_p]
|
92
|
+
XOpenDisplay.restype = Display
|
93
|
+
|
94
|
+
XRootWindow = x11.XRootWindow
|
95
|
+
XRootWindow.argtypes = [Display, ct.c_int]
|
96
|
+
XRootWindow.restype = Window
|
97
|
+
|
98
|
+
XGetAtomName = x11.XGetAtomName
|
99
|
+
XGetAtomName.argtypes = [Display, Atom]
|
100
|
+
XGetAtomName.restype = ct.c_char_p
|
101
|
+
|
102
|
+
|
103
|
+
##
|
104
|
+
|
105
|
+
|
106
|
+
def atom_to_string(display, atom) -> str:
|
107
|
+
return XGetAtomName(display, atom).decode('utf-8')
|
@@ -1,12 +1,10 @@
|
|
1
1
|
# ruff: noqa: N802 N816
|
2
2
|
import ctypes as ct
|
3
|
-
import ctypes.util
|
4
3
|
import dataclasses as dc
|
5
|
-
import sys
|
6
4
|
import typing as ta
|
7
5
|
|
8
|
-
from
|
9
|
-
|
6
|
+
from ..capi.darwin import aps
|
7
|
+
from ..capi.darwin import cf
|
10
8
|
from .clipboard import Clipboard
|
11
9
|
from .clipboard import ClipboardContents
|
12
10
|
from .clipboard import ImageClipboardContents
|
@@ -16,113 +14,7 @@ from .clipboard import TextClipboardContents
|
|
16
14
|
##
|
17
15
|
|
18
16
|
|
19
|
-
|
20
|
-
raise OSError(sys.platform)
|
21
|
-
|
22
|
-
|
23
|
-
##
|
24
|
-
# CoreFoundation
|
25
|
-
|
26
|
-
cf = ct.cdll.LoadLibrary(check.not_none(ct.util.find_library('CoreFoundation')))
|
27
|
-
|
28
|
-
#
|
29
|
-
|
30
|
-
CFArrayRef = ct.c_void_p
|
31
|
-
CFDataRef = ct.c_void_p
|
32
|
-
CFIndex = ct.c_long
|
33
|
-
CFStringEncoding = ct.c_uint32
|
34
|
-
CFStringRef = ct.c_void_p
|
35
|
-
CFTypeID = ct.c_ulong
|
36
|
-
|
37
|
-
#
|
38
|
-
|
39
|
-
cf.CFArrayGetCount.argtypes = [CFArrayRef]
|
40
|
-
cf.CFArrayGetCount.restype = CFIndex
|
41
|
-
|
42
|
-
cf.CFArrayGetValueAtIndex.argtypes = [CFArrayRef, CFIndex]
|
43
|
-
cf.CFArrayGetValueAtIndex.restype = CFStringRef
|
44
|
-
|
45
|
-
cf.CFDataGetBytePtr.argtypes = [CFDataRef]
|
46
|
-
cf.CFDataGetBytePtr.restype = ct.POINTER(ct.c_uint8)
|
47
|
-
|
48
|
-
cf.CFDataGetLength.argtypes = [CFDataRef]
|
49
|
-
cf.CFDataGetLength.restype = CFIndex
|
50
|
-
|
51
|
-
cf.CFGetTypeID.argtypes = [ct.c_void_p]
|
52
|
-
cf.CFGetTypeID.restype = CFTypeID
|
53
|
-
|
54
|
-
cf.CFRelease.argtypes = [ct.c_void_p]
|
55
|
-
cf.CFRelease.restype = None
|
56
|
-
|
57
|
-
cf.CFStringCreateWithCString.argtypes = [ct.c_void_p, ct.c_char_p, ct.c_int32]
|
58
|
-
cf.CFStringCreateWithCString.restype = CFStringRef
|
59
|
-
|
60
|
-
cf.CFStringGetCString.argtypes = [CFStringRef, ct.c_char_p, ct.c_long, ct.c_uint32]
|
61
|
-
cf.CFStringGetCString.restype = ct.c_bool
|
62
|
-
|
63
|
-
cf.CFStringGetLength.argtypes = [CFStringRef]
|
64
|
-
cf.CFStringGetLength.restype = CFIndex
|
65
|
-
|
66
|
-
cf.CFStringGetMaximumSizeForEncoding.argtypes = [CFIndex, CFStringEncoding]
|
67
|
-
cf.CFStringGetMaximumSizeForEncoding.restype = CFIndex
|
68
|
-
|
69
|
-
cf.CFStringGetTypeID.argtypes = []
|
70
|
-
cf.CFStringGetTypeID.restype = CFTypeID
|
71
|
-
|
72
|
-
|
73
|
-
##
|
74
|
-
# ApplicationServices
|
75
|
-
|
76
|
-
aps = ct.cdll.LoadLibrary(check.not_none(ct.util.find_library('ApplicationServices')))
|
77
|
-
|
78
|
-
#
|
79
|
-
|
80
|
-
OSStatus = ct.c_int32
|
81
|
-
|
82
|
-
PasteboardItemID = ct.c_ulong
|
83
|
-
PasteboardRef = ct.c_void_p
|
84
|
-
|
85
|
-
#
|
86
|
-
|
87
|
-
aps.PasteboardCopyItemFlavorData.argtypes = [PasteboardRef, PasteboardItemID, CFStringRef, ct.POINTER(CFDataRef)]
|
88
|
-
aps.PasteboardCopyItemFlavorData.restype = OSStatus
|
89
|
-
|
90
|
-
aps.PasteboardCopyItemFlavors.argtypes = [PasteboardRef, PasteboardItemID, ct.POINTER(CFArrayRef)]
|
91
|
-
aps.PasteboardCopyItemFlavors.restype = OSStatus
|
92
|
-
|
93
|
-
aps.PasteboardCreate.argtypes = [CFStringRef, ct.POINTER(PasteboardRef)]
|
94
|
-
aps.PasteboardCreate.restype = OSStatus
|
95
|
-
|
96
|
-
aps.PasteboardGetItemCount.argtypes = [PasteboardRef, ct.POINTER(ct.c_ulong)]
|
97
|
-
aps.PasteboardGetItemCount.restype = OSStatus
|
98
|
-
|
99
|
-
aps.PasteboardGetItemIdentifier.argtypes = [PasteboardRef, ct.c_ulong, ct.POINTER(PasteboardItemID)]
|
100
|
-
aps.PasteboardGetItemIdentifier.restype = OSStatus
|
101
|
-
|
102
|
-
|
103
|
-
##
|
104
|
-
|
105
|
-
|
106
|
-
def CFSTR(string):
|
107
|
-
return cf.CFStringCreateWithCString(None, string.encode('utf-8'), 0)
|
108
|
-
|
109
|
-
|
110
|
-
kCFStringEncodingUTF8 = 0x08000100
|
111
|
-
kPasteboardClipboard = CFSTR('com.apple.pasteboard.clipboard')
|
112
|
-
|
113
|
-
|
114
|
-
def cfstring_to_string(cf_string: CFStringRef) -> str:
|
115
|
-
if not cf_string:
|
116
|
-
return ''
|
117
|
-
|
118
|
-
length = cf.CFStringGetLength(cf_string)
|
119
|
-
max_size = cf.CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8) + 1
|
120
|
-
buffer = ct.create_string_buffer(max_size)
|
121
|
-
|
122
|
-
if not (success := cf.CFStringGetCString(cf_string, buffer, max_size, kCFStringEncodingUTF8)): # noqa
|
123
|
-
return ''
|
124
|
-
|
125
|
-
return buffer.value.decode('utf-8')
|
17
|
+
kPasteboardClipboard = cf.string('com.apple.pasteboard.clipboard')
|
126
18
|
|
127
19
|
|
128
20
|
##
|
@@ -153,7 +45,7 @@ def get_darwin_clipboard_data(
|
|
153
45
|
) -> list[DarwinClipboardItem]:
|
154
46
|
lst: list[DarwinClipboardItem] = []
|
155
47
|
|
156
|
-
pasteboard = PasteboardRef()
|
48
|
+
pasteboard = aps.PasteboardRef()
|
157
49
|
if status := aps.PasteboardCreate(kPasteboardClipboard, ct.byref(pasteboard)):
|
158
50
|
raise StatusDarwinClipboardError('PasteboardCreate', status)
|
159
51
|
|
@@ -163,11 +55,11 @@ def get_darwin_clipboard_data(
|
|
163
55
|
raise StatusDarwinClipboardError('PasteboardGetItemCount', status)
|
164
56
|
|
165
57
|
for i in range(1, item_count.value + 1):
|
166
|
-
item_id = PasteboardItemID()
|
58
|
+
item_id = aps.PasteboardItemID()
|
167
59
|
if status := aps.PasteboardGetItemIdentifier(pasteboard, i, ct.byref(item_id)):
|
168
60
|
raise StatusDarwinClipboardError('PasteboardGetItemIdentifier', status)
|
169
61
|
|
170
|
-
data_types = CFArrayRef()
|
62
|
+
data_types = cf.CFArrayRef()
|
171
63
|
if status := aps.PasteboardCopyItemFlavors(pasteboard, item_id, ct.byref(data_types)):
|
172
64
|
raise StatusDarwinClipboardError('PasteboardCopyItemFlavors', status)
|
173
65
|
if not data_types:
|
@@ -179,7 +71,7 @@ def get_darwin_clipboard_data(
|
|
179
71
|
data_type = cf.CFArrayGetValueAtIndex(data_types, j)
|
180
72
|
|
181
73
|
if cf.CFGetTypeID(data_type) == cf.CFStringGetTypeID():
|
182
|
-
data_type_str =
|
74
|
+
data_type_str = cf.read_string(data_type)
|
183
75
|
else:
|
184
76
|
data_type_str = None
|
185
77
|
|
@@ -195,7 +87,7 @@ def get_darwin_clipboard_data(
|
|
195
87
|
))
|
196
88
|
continue
|
197
89
|
|
198
|
-
data = CFDataRef()
|
90
|
+
data = cf.CFDataRef()
|
199
91
|
|
200
92
|
# FIXME: dumps to stderr lol:
|
201
93
|
# data_type_str = 'public.heics'
|