> ## Documentation Index
> Fetch the complete documentation index at: https://doubledata.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Desktop

> Use the native SDK with your own UI, consent callback, status, and withdrawal controls.

[Download](https://doubledata.mintlify.site/sdk/downloads.md) the native package for your architecture. Linux x86\_64 includes `libdoubledata_proxy.so`; Windows x86\_64 includes `doubledata_proxy.dll`. Both include `doubledata_proxy.h`.

## Run the desktop example

Download [desktop.py](https://github.com/doubledata-proxy/docs/releases/download/sdk-v1.0.1/desktop.py) and configure [application-sdk.json](https://doubledata.mintlify.site/sdk/configuration.md):

```bash theme={null}
python3 desktop.py \
  --library /absolute/path/to/libdoubledata_proxy.so \
  --config /absolute/path/to/application-sdk.json
```

The Python 3/Tkinter example provides a scrollable notice, clickable privacy link, sharing status, pause, and withdrawal. On Windows, pass the DLL path.

## Embed the example UI

```python theme={null}
import tkinter as tk
from desktop import App

window = tk.Tk()
app = App(window, "./libdoubledata_proxy.so", "./application-sdk.json")
window.mainloop()
```

The native client supplies the DoubleData notice. No application-authored notice or acceptance flag is required.

## Use your own presenter

```python theme={null}
def show_consent(window, notice):
    # Render every notice field in your app's UI and wait for a choice.
    return sharing_dialog.show_and_wait(window, notice)

app = App(window, library_path, config_path, present_consent=show_consent)
```

`sharing_dialog` is your app's UI bridge. Return `True` only after explicit acceptance and `False` for decline or dismissal. Keep the complete text, operator, contact, and privacy link accessible. Use the full example for cancellation and shutdown handling.

## Call the C API

```c theme={null}
uint64_t handle = 0;
char *error = NULL;
if (DoubleDataCreate(config_json, &handle, &error) == 0) {
    /* Run consent presentation on a worker; post the UI to main. */
    if (DoubleDataRequestConsent(handle, present_notice, context, &error) == 0) {
        DoubleDataStart(handle, &error);
    }
}
```

`present_notice` receives the full JSON and returns `DOUBLEDATA_CONSENT_ACCEPT`, `DOUBLEDATA_CONSENT_DECLINE`, or `DOUBLEDATA_CONSENT_DISMISS` from the user's choice. Free each returned error or status string with `DoubleDataFreeString` before reusing its pointer.

Pause with `DoubleDataStop`, withdraw with `DoubleDataWithdrawConsent`, and close with `DoubleDataDestroy`. Await cleanup off the UI thread; retry destroy if cleanup fails. [Participation flow](https://doubledata.mintlify.site/sdk/consent.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.