Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
n_clipboard.h
Go to the documentation of this file.
1/*
2 * Nilorea Library
3 * Copyright (C) 2005-2026 Castagnier Mickael
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 * implied. See the License for the specific language governing
15 * permissions and limitations under the License.
16 *
17 * SPDX-License-Identifier: Apache-2.0
18 */
19
48#ifndef __N_CLIPBOARD_H
49#define __N_CLIPBOARD_H
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
56#define N_CLIPBOARD_CLIPBOARD 0
59#define N_CLIPBOARD_PRIMARY 1
60
65int n_clipboard_init(void);
66
71int n_clipboard_available(void);
72
79int n_clipboard_set(int which, const char* text);
80
87char* n_clipboard_get(int which);
88
92void n_clipboard_destroy(void);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif /* __N_CLIPBOARD_H */
int n_clipboard_set(int which, const char *text)
Own which selection and serve text to any app that requests it.
int n_clipboard_available(void)
Whether a real clipboard backend (X11 or Win32) is active on this platform.
int n_clipboard_init(void)
Start the clipboard backend (idempotent; also started lazily on first use).
char * n_clipboard_get(int which)
Fetch the current text of which selection from its owner.
void n_clipboard_destroy(void)
Stop the backend thread and release the display connection.