00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef INCL_XDRAG
00022 #define INCL_XDRAG
00023
00024 #include "u7drag.h"
00025
00026 const int max_types = 15;
00027
00028
00029
00030
00031 class Xdnd
00032 {
00033 Display *display;
00034 Window xwmwin;
00035 Window xgamewin;
00036 Atom shapeid_atom;
00037 Atom chunkid_atom;
00038 Atom comboid_atom;
00039 Atom xdnd_aware;
00040 Atom xdnd_enter;
00041 Atom xdnd_leave;
00042 Atom xdnd_position;
00043 Atom xdnd_drop;
00044 Atom xdnd_status;
00045 Atom xdnd_copy;
00046 Atom xdnd_ask;
00047 Atom xdnd_typelist;
00048 Atom xdnd_selection;
00049 unsigned long xdnd_version;
00050 int num_types;
00051 Atom drag_types[max_types];
00052
00053 int lastx, lasty;
00054
00055 int winx, winy;
00056 int file, shape, frame;
00057 int chunknum;
00058 int combo_cnt;
00059 int combo_xtiles, combo_ytiles, combo_tiles_right, combo_tiles_below;
00060 struct U7_combo_data *combo;
00061 bool data_valid;
00062
00063 Move_shape_handler_fun move_shape_handler;
00064 Move_combo_handler_fun move_combo_handler;
00065 Drop_shape_handler_fun shape_handler;
00066 Drop_chunk_handler_fun chunk_handler;
00067 Drop_combo_handler_fun combo_handler;
00068 public:
00069 Xdnd(Display *d, Window xw, Window xgw, Move_shape_handler_fun movefun,
00070 Move_combo_handler_fun movecmbfun,
00071 Drop_shape_handler_fun shapefun, Drop_chunk_handler_fun cfun,
00072 Drop_combo_handler_fun cmbfun);
00073 ~Xdnd();
00074 void client_msg(XClientMessageEvent& cev);
00075 void select_msg(XSelectionEvent& sev);
00076 };
00077
00078 #endif