Debian Codegraph @

clutter/x11/xsettings/xsettings-client.h

raw
1 /*
2 * Copyright © 2001, 2007 Red Hat, Inc.
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Red Hat not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. Red Hat makes no representations about the
11 * suitability of this software for any purpose. It is provided "as is"
12 * without express or implied warranty.
13 *
14 * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
16 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
18 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 *
21 * Author: Owen Taylor, Red Hat, Inc.
22 */
23 #ifndef XSETTINGS_CLIENT_H
24 #define XSETTINGS_CLIENT_H
25
26 #include <X11/Xlib.h>
27 #include "xsettings-common.h"
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32
33 typedef struct _XSettingsClient XSettingsClient;
34
35 typedef enum
36 {
37 XSETTINGS_ACTION_NEW,
38 XSETTINGS_ACTION_CHANGED,
39 XSETTINGS_ACTION_DELETED
40 } XSettingsAction;
41
42 typedef void (*XSettingsNotifyFunc) (const char *name,
43 XSettingsAction action,
44 XSettingsSetting *setting,
45 void *cb_data);
46 typedef Bool (*XSettingsWatchFunc) (Window window,
47 Bool is_start,
48 long mask,
49 void *cb_data);
50 typedef void (*XSettingsGrabFunc) (Display *display);
51
52 XSettingsClient *xsettings_client_new (Display *display,
53 int screen,
54 XSettingsNotifyFunc notify,
55 XSettingsWatchFunc watch,
56 void *cb_data);
57 XSettingsClient *xsettings_client_new_with_grab_funcs (Display *display,
58 int screen,
59 XSettingsNotifyFunc notify,
60 XSettingsWatchFunc watch,
61 void *cb_data,
62 XSettingsGrabFunc grab,
63 XSettingsGrabFunc ungrab);
64 void xsettings_client_set_grab_func (XSettingsClient *client,
65 XSettingsGrabFunc grab);
66 void xsettings_client_set_ungrab_func (XSettingsClient *client,
67 XSettingsGrabFunc ungrab);
68 void xsettings_client_destroy (XSettingsClient *client);
69 Bool xsettings_client_process_event (XSettingsClient *client,
70 XEvent *xev);
71 XSettingsResult xsettings_client_get_setting (XSettingsClient *client,
72 const char *name,
73 XSettingsSetting **setting);
74
75 #ifdef __cplusplus
76 }
77 #endif /* __cplusplus */
78
79 #endif /* XSETTINGS_CLIENT_H */