X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fdispatch.h;h=d3ac0d4e7b41676296e05f586492d5233ae3844a;hb=365a9fbb69f599990dae1d5e1458dbe58beff161;hp=a28386210ad3f95bcec472c6d93eab0d71b2155d;hpb=648c55b829e09c66222a9bbf08d10434622feae2;p=chaz%2Fopenbox diff --git a/openbox/dispatch.h b/openbox/dispatch.h index a2838621..d3ac0d4e 100644 --- a/openbox/dispatch.h +++ b/openbox/dispatch.h @@ -18,21 +18,25 @@ typedef enum { Event_X_Bell = 1 << 7, /* an XKB bell event */ Event_Client_New = 1 << 8, /* new window, before mapping */ - Event_Client_Mapped = 1 << 9, /* new window, after mapping */ + Event_Client_Mapped = 1 << 9, /* new window, after mapping + or uniconified */ Event_Client_Destroy = 1 << 10, /* unmanaged */ - Event_Client_Unmapped = 1 << 11, /* unmanaged, after unmapping */ + Event_Client_Unmapped = 1 << 11, /* unmanaged, after unmapping + or iconified */ Event_Client_Focus = 1 << 12, /* focused */ Event_Client_Unfocus = 1 << 13, /* unfocused */ Event_Client_Urgent = 1 << 14, /* entered/left urgent state */ Event_Client_Desktop = 1 << 15, /* moved to a new desktop */ + Event_Client_Moving = 1 << 16, /* being interactively moved */ + Event_Client_Resizing = 1 << 17, /* being interactively resized */ - Event_Ob_Desktop = 1 << 16, /* changed desktops */ - Event_Ob_NumDesktops = 1 << 17, /* changed the number of desktops */ - Event_Ob_ShowDesktop = 1 << 18, /* entered/left show-the-desktop mode */ + Event_Ob_Desktop = 1 << 18, /* changed desktops */ + Event_Ob_NumDesktops = 1 << 19, /* changed the number of desktops */ + Event_Ob_ShowDesktop = 1 << 20, /* entered/left show-the-desktop mode */ - Event_Signal = 1 << 19, /* a signal from the OS */ + Event_Signal = 1 << 21, /* a signal from the OS */ - EVENT_RANGE = 1 << 20 + EVENT_RANGE = 1 << 22 } EventType; typedef struct { @@ -42,9 +46,16 @@ typedef struct { typedef struct { Client *client; - int num[2]; + int num[3]; /* Event_Client_Desktop: num[0] = new number, num[1] = old number Event_Client_Urgent: num[0] = urgent state + Event_Client_Moving: num[0] = dest x coord, num[1] = dest y coord -- + change these in the handler to adjust where the + window will be placed + Event_Client_Resizing: num[0] = dest width, num[1] = dest height -- + change these in the handler to adjust where the + window will be placed + num[2] = the anchored corner */ } EventData_Client; @@ -82,5 +93,11 @@ void dispatch_x(XEvent *e, Client *c); void dispatch_client(EventType e, Client *c, int num0, int num1); void dispatch_ob(EventType e, int num0, int num1); void dispatch_signal(int signal); +/* *x and *y should be set with the destination of the window, they may be + changed by the event handlers */ +void dispatch_move(Client *c, int *x, int *y); +/* *w and *h should be set with the destination of the window, they may be + changed by the event handlers */ +void dispatch_resize(Client *c, int *w, int *h, Corner corner); #endif