2003-09-23 01:09:32 -07:00
|
|
|
#ifndef _ECORE_X_PRIVATE_H
|
|
|
|
#define _ECORE_X_PRIVATE_H
|
|
|
|
|
2005-01-04 02:26:17 -08:00
|
|
|
#include "config.h"
|
|
|
|
|
2003-10-12 10:55:28 -07:00
|
|
|
#include <sys/param.h>
|
|
|
|
#ifndef MAXHOSTNAMELEN
|
|
|
|
#define MAXHOSTNAMELEN 256
|
|
|
|
#endif
|
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
#define XK_MISCELLANY 1
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xproto.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#include <X11/Xresource.h>
|
|
|
|
#include <X11/keysymdef.h>
|
|
|
|
#include <X11/extensions/XShm.h>
|
|
|
|
#include <X11/extensions/shape.h>
|
2005-01-04 02:26:17 -08:00
|
|
|
#ifdef ECORE_XCURSOR
|
|
|
|
#include <X11/Xcursor/Xcursor.h>
|
|
|
|
#endif
|
2005-03-23 03:49:48 -08:00
|
|
|
#ifdef ECORE_XPRINT
|
|
|
|
#include <X11/extensions/Print.h>
|
|
|
|
#endif
|
2005-01-10 05:11:50 -08:00
|
|
|
#ifdef ECORE_XINERAMA
|
|
|
|
#include <X11/extensions/Xinerama.h>
|
|
|
|
#endif
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-12-04 02:10:29 -08:00
|
|
|
#include "Ecore_X.h"
|
2003-09-23 01:09:32 -07:00
|
|
|
|
|
|
|
/* FIXME: this is for simulation only */
|
|
|
|
#include "Ecore_Job.h"
|
2004-11-23 07:17:56 -08:00
|
|
|
#include "Ecore_Txt.h"
|
2003-09-23 01:09:32 -07:00
|
|
|
|
|
|
|
typedef struct _Ecore_X_Reply Ecore_X_Reply;
|
|
|
|
|
|
|
|
struct _Ecore_X_Reply
|
|
|
|
{
|
|
|
|
/* FIXME: this is for simulation only */
|
|
|
|
Ecore_Job *job;
|
|
|
|
|
|
|
|
void *reply_data;
|
|
|
|
void (*reply_data_free) (void *reply_data);
|
|
|
|
|
|
|
|
void (*func) (void *data, Ecore_X_Reply *reply, void *reply_data);
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
2004-01-05 19:42:05 -08:00
|
|
|
typedef struct _Ecore_X_Selection_Data Ecore_X_Selection_Data;
|
|
|
|
|
|
|
|
struct _Ecore_X_Selection_Data
|
|
|
|
{
|
|
|
|
Window win;
|
|
|
|
Atom selection;
|
2004-02-04 23:14:56 -08:00
|
|
|
unsigned char *data;
|
2004-01-05 19:42:05 -08:00
|
|
|
int length;
|
2004-01-10 13:01:18 -08:00
|
|
|
Time time;
|
2004-01-05 19:42:05 -08:00
|
|
|
};
|
|
|
|
|
2004-01-16 12:41:45 -08:00
|
|
|
typedef struct _Ecore_X_Selection_Converter Ecore_X_Selection_Converter;
|
|
|
|
|
|
|
|
struct _Ecore_X_Selection_Converter
|
|
|
|
{
|
|
|
|
Atom target;
|
|
|
|
int (*convert)(char *target, void *data, int size,
|
|
|
|
void **data_ret, int *size_ret);
|
|
|
|
struct _Ecore_X_Selection_Converter *next;
|
|
|
|
};
|
|
|
|
|
2005-03-24 07:45:33 -08:00
|
|
|
typedef struct _Ecore_X_DND_Source
|
2004-02-04 23:14:56 -08:00
|
|
|
{
|
|
|
|
int version;
|
2005-03-24 07:45:33 -08:00
|
|
|
Window win, dest;
|
2004-02-04 23:14:56 -08:00
|
|
|
|
|
|
|
enum {
|
2005-03-24 07:45:33 -08:00
|
|
|
ECORE_X_DND_SOURCE_IDLE,
|
|
|
|
ECORE_X_DND_SOURCE_DRAGGING,
|
|
|
|
ECORE_X_DND_SOURCE_DROPPED,
|
|
|
|
ECORE_X_DND_SOURCE_CONVERTING
|
2004-02-04 23:14:56 -08:00
|
|
|
} state;
|
|
|
|
|
|
|
|
struct {
|
2004-02-05 21:32:51 -08:00
|
|
|
short x, y;
|
|
|
|
unsigned short width, height;
|
|
|
|
} rectangle;
|
2004-02-04 23:14:56 -08:00
|
|
|
|
2004-02-21 00:58:20 -08:00
|
|
|
Time time;
|
2005-03-22 13:59:35 -08:00
|
|
|
|
|
|
|
Ecore_X_Atom action, accepted_action;
|
2004-02-04 23:14:56 -08:00
|
|
|
|
2004-02-07 11:37:47 -08:00
|
|
|
int will_accept;
|
|
|
|
int suppress;
|
2004-02-29 00:15:47 -08:00
|
|
|
|
|
|
|
int await_status;
|
2005-03-24 07:45:33 -08:00
|
|
|
} Ecore_X_DND_Source;
|
|
|
|
|
|
|
|
typedef struct _Ecore_X_DND_Target
|
|
|
|
{
|
|
|
|
int version;
|
|
|
|
Window win, source;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ECORE_X_DND_TARGET_IDLE,
|
|
|
|
ECORE_X_DND_TARGET_ENTERED
|
|
|
|
} state;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
int x, y;
|
|
|
|
} pos;
|
|
|
|
|
|
|
|
Time time;
|
|
|
|
|
|
|
|
Ecore_X_Atom action, accepted_action;
|
|
|
|
|
|
|
|
int will_accept;
|
|
|
|
} Ecore_X_DND_Target;
|
2004-02-04 23:14:56 -08:00
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
extern Display *_ecore_x_disp;
|
|
|
|
extern double _ecore_x_double_click_time;
|
|
|
|
extern Time _ecore_x_event_last_time;
|
|
|
|
extern Window _ecore_x_event_last_win;
|
|
|
|
extern int _ecore_x_event_last_root_x;
|
|
|
|
extern int _ecore_x_event_last_root_y;
|
2005-01-04 02:26:17 -08:00
|
|
|
extern int _ecore_x_xcursor;
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-12-04 02:10:29 -08:00
|
|
|
extern Ecore_X_Atom _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_NUM];
|
2004-02-04 23:14:56 -08:00
|
|
|
|
2004-12-03 19:54:04 -08:00
|
|
|
extern int _ecore_window_grabs_num;
|
|
|
|
extern Window *_ecore_window_grabs;
|
|
|
|
extern int (*_ecore_window_grab_replay_func) (void *data, int event_type, void *event);
|
|
|
|
extern void *_ecore_window_grab_replay_data;
|
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
void _ecore_x_error_handler_init(void);
|
|
|
|
void _ecore_x_event_handle_key_press(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_key_release(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_button_press(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_button_release(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_motion_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_enter_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_leave_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_focus_in(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_focus_out(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_keymap_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_expose(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_graphics_expose(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_visibility_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_create_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_destroy_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_unmap_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_map_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_map_request(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_reparent_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_configure_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_configure_request(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_gravity_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_resize_request(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_circulate_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_circulate_request(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_property_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_selection_clear(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_selection_request(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_selection_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_colormap_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_client_message(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_mapping_notify(XEvent *xevent);
|
|
|
|
void _ecore_x_event_handle_shape_change(XEvent *xevent);
|
|
|
|
|
2004-02-04 23:14:56 -08:00
|
|
|
void _ecore_x_selection_data_init(void);
|
2004-02-04 09:43:41 -08:00
|
|
|
void _ecore_x_selection_shutdown(void);
|
2004-01-16 16:14:37 -08:00
|
|
|
Atom _ecore_x_selection_target_atom_get(char *target);
|
2005-03-24 07:45:33 -08:00
|
|
|
char *_ecore_x_selection_target_get(Atom target);
|
2004-01-10 13:01:18 -08:00
|
|
|
void _ecore_x_selection_request_data_set(Ecore_X_Selection_Data data);
|
2004-04-23 15:17:01 -07:00
|
|
|
Ecore_X_Selection_Data *
|
|
|
|
_ecore_x_selection_get(Atom selection);
|
2004-02-04 23:14:56 -08:00
|
|
|
int _ecore_x_selection_set(Window w, unsigned char *data, int len, Atom selection);
|
2004-01-16 16:14:37 -08:00
|
|
|
int _ecore_x_selection_convert(Atom selection, Atom target, void **data_ret);
|
2004-01-10 13:01:18 -08:00
|
|
|
|
2004-02-04 23:14:56 -08:00
|
|
|
void _ecore_x_dnd_init(void);
|
2005-03-24 07:45:33 -08:00
|
|
|
Ecore_X_DND_Source *_ecore_x_dnd_source_get(void);
|
|
|
|
Ecore_X_DND_Target *_ecore_x_dnd_target_get(void);
|
2004-10-23 22:52:07 -07:00
|
|
|
void _ecore_x_dnd_drag(int x, int y);
|
2004-12-27 10:28:14 -08:00
|
|
|
void _ecore_x_dnd_shutdown(void);
|
2004-10-23 22:52:07 -07:00
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
#endif
|