~ubuntu-branches/ubuntu/trusty/fcitx/trusty-proposed

« back to all changes in this revision

Viewing changes to src/module/x11/x11stuff.h

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2013-02-10 17:03:56 UTC
  • mfrom: (1.3.18) (33.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20130210170356-2yuv6xy3ed378kn0
Tags: 1:4.2.7-1
* New upstream release.
* New binary packages:
  - fcitx-libs-gclient: D-Bus client library for Glib
  - fcitx-libs-qt: D-Bus client library for Qt
  - fcitx-module-quickphrase-editor: Quick Phrase editor module

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#ifndef X11STUFF_H
22
22
#define X11STUFF_H
 
23
 
 
24
#ifndef FCITX_DISABLE_X11
23
25
#include <X11/Xlib.h>
 
26
#endif
 
27
 
 
28
#include <stdint.h>
24
29
#include <fcitx-utils/utarray.h>
25
30
#include <fcitx-config/fcitx-config.h>
 
31
#include <fcitx/instance.h>
 
32
#include <fcitx/addon.h>
 
33
#include <fcitx/module.h>
26
34
 
27
35
#define FCITX_X11_NAME "fcitx-x11"
28
36
#define FCITX_X11_GETDISPLAY 0
47
55
#define FCITX_X11_GETSCREENGEOMETRY_RETURNTYPE void
48
56
#define FCITX_X11_PROCESSREMAINEVENT 10
49
57
#define FCITX_X11_PROCESSREMAINEVENT_RETURNTYPE void
50
 
 
51
 
 
52
 
struct _FcitxInstance;
53
 
 
54
 
typedef struct _FcitxXEventHandler {
55
 
    boolean(*eventHandler)(void* instance, XEvent* event);
56
 
    void* instance;
57
 
} FcitxXEventHandler;
58
 
 
59
 
typedef struct _FcitxCompositeChangedHandler {
60
 
    void (*eventHandler)(void* instance, boolean enable);
61
 
    void *instance;
62
 
} FcitxCompositeChangedHandler;
 
58
#define FCITX_X11_GETDPI 11
 
59
#define FCITX_X11_GETDPI_RETURNTYPE void
 
60
 
 
61
#ifndef FCITX_DISABLE_X11
 
62
typedef boolean (*FcitxX11XEventHandler)(void *instance, XEvent *event);
 
63
#endif
 
64
typedef void (*FcitxX11CompositeHandler)(void *instance, boolean enable);
63
65
 
64
66
typedef struct _FcitxRect {
65
67
    int x1, y1, x2, y2;
66
68
} FcitxRect;
67
69
 
68
 
typedef struct _FcitxX11 {
69
 
    Display *dpy;
70
 
    UT_array handlers;
71
 
    UT_array comphandlers;
72
 
    struct _FcitxInstance* owner;
73
 
    Window compManager;
74
 
    Atom compManagerAtom;
75
 
    int iScreen;
76
 
    Atom typeMenuAtom;
77
 
    Atom windowTypeAtom;
78
 
    Atom typeDialogAtom;
79
 
    Atom typeDockAtom;
80
 
    Atom pidAtom;
81
 
    boolean bUseXinerama;
82
 
    FcitxRect* rects;
83
 
    int screenCount;
84
 
    int defaultScreen;
85
 
    struct _FcitxAddon* xim;
86
 
} FcitxX11;
87
 
 
88
70
typedef enum _FcitxXWindowType {
89
71
    FCITX_WINDOW_UNKNOWN,
90
72
    FCITX_WINDOW_DOCK,
92
74
    FCITX_WINDOW_DIALOG
93
75
} FcitxXWindowType;
94
76
 
 
77
typedef void (*X11SelectionNotifyCallback)(void *owner, const char *selection,
 
78
                                           int subtype, void *data);
 
79
typedef void (*X11ConvertSelectionCallback)(
 
80
    void *owner, const char *sel_str, const char *tgt_str, int format,
 
81
    size_t nitems, const void *buff, void *data);
 
82
 
95
83
#endif
96
84
// kate: indent-mode cstyle; space-indent on; indent-width 0;