summaryrefslogtreecommitdiffstats
path: root/src/vdagent-x11.h
blob: a2a24859f8f5136b18d5ea1d814ff166c47ddac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*  vdagent-x11.h vdagent x11 code header file

    Copyright 2010 Red Hat, Inc.

    Red Hat Authors:
    Hans de Goede <hdegoede@redhat.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or   
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __VDAGENT_X11_H
#define __VDAGENT_X11_H

#include <stdio.h>
#include <spice/vd_agent.h>
#include "udscs.h"

struct vdagent_x11;

struct vdagent_x11 *vdagent_x11_create(struct udscs_connection *vdagentd,
    int debug, int sync);
void vdagent_x11_destroy(struct vdagent_x11 *x11, int vdagentd_disconnected);

int  vdagent_x11_get_fd(struct vdagent_x11 *x11);
void vdagent_x11_do_read(struct vdagent_x11 *x11);

void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11,
    VDAgentMonitorsConfig *mon_config, int fallback);

void vdagent_x11_clipboard_grab(struct vdagent_x11 *x11, uint8_t selection,
    uint32_t *types, uint32_t type_count);
void vdagent_x11_clipboard_request(struct vdagent_x11 *x11,
    uint8_t selection, uint32_t type);
void vdagent_x11_clipboard_data(struct vdagent_x11 *x11, uint8_t selection,
    uint32_t type, uint8_t *data, uint32_t size);
void vdagent_x11_clipboard_release(struct vdagent_x11 *x11, uint8_t selection);

int vdagent_x11_has_icons_on_desktop(struct vdagent_x11 *x11);

#endif