KWWidgets
Classes | Macros | Typedefs | Functions
DndP.h File Reference
#include <Dnd.h>
#include <X11/Xmd.h>
Include dependency graph for DndP.h:

Go to the source code of this file.

Classes

struct  _DndSrcProp
struct  _DndReceiverProp
struct  _DndTop
struct  _DndPot
struct  _DndMessage
struct  DndTargets
struct  DndTargetsTableEntryRec
struct  DndTargetsTableRec

Macros

#define DND_PROTOCOL_VERSION   0
#define DND_EVENT_TYPE_MASK   ((BYTE)0x80)
#define DND_EVENT_TYPE_SHIFT   7
#define DND_CLEAR_EVENT_TYPE   ((BYTE)0x7F)
#define DND_GET_EVENT_TYPE(message_type)   ((char) (((message_type) & DND_EVENT_TYPE_MASK) >> DND_EVENT_TYPE_SHIFT))
#define DND_SET_EVENT_TYPE(event_type)   (((BYTE)(event_type) << DND_EVENT_TYPE_SHIFT) & DND_EVENT_TYPE_MASK)
#define DND_OPERATION_MASK   ((CARD16) 0x000F)
#define DND_OPERATION_SHIFT   0
#define DND_STATUS_MASK   ((CARD16) 0x00F0)
#define DND_STATUS_SHIFT   4
#define DND_OPERATIONS_MASK   ((CARD16) 0x0F00)
#define DND_OPERATIONS_SHIFT   8
#define DND_COMPLETION_MASK   ((CARD16) 0xF000)
#define DND_COMPLETION_SHIFT   12
#define DND_GET_OPERATION(flags)
#define DND_SET_OPERATION(operation)
#define DND_GET_STATUS(flags)
#define DND_SET_STATUS(status)
#define DND_GET_OPERATIONS(flags)
#define DND_SET_OPERATIONS(operation)
#define DND_GET_COMPLETION(flags)
#define DND_SET_COMPLETION(completion)
#define SWAP4BYTES(l)
#define SWAP2BYTES(s)

Typedefs

typedef struct _DndSrcProp DndSrcProp
typedef struct _DndReceiverProp DndReceiverProp
typedef struct _DndTop DndTop
typedef struct _DndPot DndPot
typedef struct _DndMessage DndMessage
typedef struct
DndTargetsTableEntryRec
DndTargetsTableEntry
typedef struct DndTargetsTableRecDndTargetsTable

Functions

unsigned char _DndByteOrder (void)
int _DndTargetsToIndex (Display *display, Atom *targets, int num_targets)
int _DndIndexToTargets (Display *display, int index, Atom **targets)

Macro Definition Documentation

#define DND_PROTOCOL_VERSION   0

Definition at line 74 of file DndP.h.

#define DND_EVENT_TYPE_MASK   ((BYTE)0x80)

Definition at line 77 of file DndP.h.

#define DND_EVENT_TYPE_SHIFT   7

Definition at line 78 of file DndP.h.

#define DND_CLEAR_EVENT_TYPE   ((BYTE)0x7F)

Definition at line 79 of file DndP.h.

#define DND_GET_EVENT_TYPE (   message_type)    ((char) (((message_type) & DND_EVENT_TYPE_MASK) >> DND_EVENT_TYPE_SHIFT))

Definition at line 83 of file DndP.h.

#define DND_SET_EVENT_TYPE (   event_type)    (((BYTE)(event_type) << DND_EVENT_TYPE_SHIFT) & DND_EVENT_TYPE_MASK)

Definition at line 87 of file DndP.h.

#define DND_OPERATION_MASK   ((CARD16) 0x000F)

Definition at line 91 of file DndP.h.

#define DND_OPERATION_SHIFT   0

Definition at line 92 of file DndP.h.

#define DND_STATUS_MASK   ((CARD16) 0x00F0)

Definition at line 93 of file DndP.h.

#define DND_STATUS_SHIFT   4

Definition at line 94 of file DndP.h.

#define DND_OPERATIONS_MASK   ((CARD16) 0x0F00)

Definition at line 95 of file DndP.h.

#define DND_OPERATIONS_SHIFT   8

Definition at line 96 of file DndP.h.

#define DND_COMPLETION_MASK   ((CARD16) 0xF000)

Definition at line 97 of file DndP.h.

#define DND_COMPLETION_SHIFT   12

Definition at line 98 of file DndP.h.

#define DND_GET_OPERATION (   flags)
Value:
((unsigned char) \

Definition at line 100 of file DndP.h.

#define DND_SET_OPERATION (   operation)
Value:
(((CARD16)(operation) << DND_OPERATION_SHIFT)\

Definition at line 104 of file DndP.h.

#define DND_GET_STATUS (   flags)
Value:
((unsigned char) \

Definition at line 108 of file DndP.h.

#define DND_SET_STATUS (   status)
Value:
(((CARD16)(status) << DND_STATUS_SHIFT)\

Definition at line 112 of file DndP.h.

#define DND_GET_OPERATIONS (   flags)
Value:
((unsigned char) \

Definition at line 116 of file DndP.h.

#define DND_SET_OPERATIONS (   operation)
Value:
(((CARD16)(operation) << DND_OPERATIONS_SHIFT)\

Definition at line 120 of file DndP.h.

#define DND_GET_COMPLETION (   flags)
Value:
((unsigned char) \

Definition at line 124 of file DndP.h.

#define DND_SET_COMPLETION (   completion)
Value:
(((CARD16)(completion) << DND_COMPLETION_SHIFT)\

Definition at line 128 of file DndP.h.

#define SWAP4BYTES (   l)
Value:
{\
struct { unsigned t :32;} bit32;\
char n, *tp = (char *) &bit32;\
bit32.t = l;\
n = tp[0]; tp[0] = tp[3]; tp[3] = n;\
n = tp[1]; tp[1] = tp[2]; tp[2] = n;\
l = bit32.t;\
}

Definition at line 133 of file DndP.h.

#define SWAP2BYTES (   s)
Value:
{\
struct { unsigned t :16; } bit16;\
char n, *tp = (char *) &bit16;\
bit16.t = s;\
n = tp[0]; tp[0] = tp[1]; tp[1] = n;\
s = bit16.t;\
}

Definition at line 142 of file DndP.h.

Typedef Documentation

typedef struct _DndSrcProp DndSrcProp
typedef struct _DndTop DndTop
typedef struct _DndPot DndPot
typedef struct _DndMessage DndMessage

Function Documentation

unsigned char _DndByteOrder ( void  )

Private extern functions.

int _DndTargetsToIndex ( Display *  display,
Atom *  targets,
int  num_targets 
)
int _DndIndexToTargets ( Display *  display,
int  index,
Atom **  targets 
)