diff --git a/crates/ffi/Cargo.toml b/crates/ffi/Cargo.toml index 918ad39..a0f46ee 100644 --- a/crates/ffi/Cargo.toml +++ b/crates/ffi/Cargo.toml @@ -23,7 +23,7 @@ agent-desktop-windows = { path = "../windows" } agent-desktop-linux = { path = "../linux" } [build-dependencies] -cbindgen = "= 0.27.0" +cbindgen = "= 0.29.2" [lints] workspace = true diff --git a/crates/ffi/include/agent_desktop.h b/crates/ffi/include/agent_desktop.h index 4696b97..201f675 100644 --- a/crates/ffi/include/agent_desktop.h +++ b/crates/ffi/include/agent_desktop.h @@ -5,6 +5,31 @@ #include #include +enum AdResult { + AD_RESULT_OK = 0, + AD_RESULT_ERR_PERM_DENIED = -1, + AD_RESULT_ERR_ELEMENT_NOT_FOUND = -2, + AD_RESULT_ERR_APP_NOT_FOUND = -3, + AD_RESULT_ERR_ACTION_FAILED = -4, + AD_RESULT_ERR_ACTION_NOT_SUPPORTED = -5, + AD_RESULT_ERR_STALE_REF = -6, + AD_RESULT_ERR_WINDOW_NOT_FOUND = -7, + AD_RESULT_ERR_PLATFORM_NOT_SUPPORTED = -8, + AD_RESULT_ERR_TIMEOUT = -9, + AD_RESULT_ERR_INVALID_ARGS = -10, + AD_RESULT_ERR_NOTIFICATION_NOT_FOUND = -11, + AD_RESULT_ERR_INTERNAL = -12, + AD_RESULT_ERR_SNAPSHOT_NOT_FOUND = -13, + AD_RESULT_ERR_POLICY_DENIED = -14, +}; +typedef int32_t AdResult; + +enum AdImageFormat { + AD_IMAGE_FORMAT_PNG = 0, + AD_IMAGE_FORMAT_JPG = 1, +}; +typedef int32_t AdImageFormat; + enum AdActionKind { AD_ACTION_KIND_CLICK = 0, AD_ACTION_KIND_DOUBLE_CLICK = 1, @@ -38,12 +63,6 @@ enum AdDirection { }; typedef int32_t AdDirection; -enum AdImageFormat { - AD_IMAGE_FORMAT_PNG = 0, - AD_IMAGE_FORMAT_JPG = 1, -}; -typedef int32_t AdImageFormat; - enum AdModifier { AD_MODIFIER_CMD = 0, AD_MODIFIER_CTRL = 1, @@ -74,25 +93,6 @@ enum AdPolicyKind { }; typedef int32_t AdPolicyKind; -enum AdResult { - AD_RESULT_OK = 0, - AD_RESULT_ERR_PERM_DENIED = -1, - AD_RESULT_ERR_ELEMENT_NOT_FOUND = -2, - AD_RESULT_ERR_APP_NOT_FOUND = -3, - AD_RESULT_ERR_ACTION_FAILED = -4, - AD_RESULT_ERR_ACTION_NOT_SUPPORTED = -5, - AD_RESULT_ERR_STALE_REF = -6, - AD_RESULT_ERR_WINDOW_NOT_FOUND = -7, - AD_RESULT_ERR_PLATFORM_NOT_SUPPORTED = -8, - AD_RESULT_ERR_TIMEOUT = -9, - AD_RESULT_ERR_INVALID_ARGS = -10, - AD_RESULT_ERR_NOTIFICATION_NOT_FOUND = -11, - AD_RESULT_ERR_INTERNAL = -12, - AD_RESULT_ERR_SNAPSHOT_NOT_FOUND = -13, - AD_RESULT_ERR_POLICY_DENIED = -14, -}; -typedef int32_t AdResult; - enum AdScreenshotKind { AD_SCREENSHOT_KIND_SCREEN = 0, AD_SCREENSHOT_KIND_WINDOW = 1,