Logo Search packages:      
Sourcecode: herbstluftwm version File versions  Download package



#include <X11/Xlib.h>

// various snap-flags
enum SnapFlags {
    // which edges are considered to snap
    SNAP_EDGE_TOP       = 0x01,
    SNAP_EDGE_BOTTOM    = 0x02,
    SNAP_EDGE_LEFT      = 0x04,
    SNAP_EDGE_RIGHT     = 0x08,
    SNAP_EDGE_ALL       =

// foreward declarations
struct HSClient;
struct HSTag;

void mouse_init();
void mouse_destroy();

typedef void (*MouseFunction)(XMotionEvent*);

00028 typedef struct MouseBinding {
    unsigned int modifiers;
    unsigned int button;
    MouseFunction function;
} MouseBinding;

int mouse_binding_equals(MouseBinding* a, MouseBinding* b);

void mouse_bind_function(unsigned int modifiers, unsigned int button,
                         MouseFunction function);
int mouse_bind_command(int argc, char** argv);
int mouse_unbind_all();
MouseBinding* mouse_binding_find(unsigned int modifiers, unsigned int button);
void mouse_regrab_all();

unsigned int string2button(char* name);
MouseFunction string2mousefunction(char* name);

void mouse_start_drag(XEvent* ev);
void mouse_stop_drag();
void handle_motion_event(XEvent* ev);

// get the vector to snap a client to it's neighbour
void client_snap_vector(struct HSClient* client, struct HSTag* tag,
                        enum SnapFlags flags,
                        int* return_dx, int* return_dy);

/* some mouse functions */
void mouse_function_move(XMotionEvent* me);
void mouse_function_resize(XMotionEvent* me);
void mouse_function_zoom(XMotionEvent* me);


Generated by  Doxygen 1.6.0   Back to index