void orderAboveWindow(int wid, int above) { CGSConnection cid; cid = _CGSDefaultConnection(); CGSOrderWindow(cid, wid, kCGSOrderAbove, above); CGSFlushWindow(cid, wid, 0); }
void DEHandleOrderEvent(DecEvent* event) { DecEventOrder* eventOrder = dec_event_order_new(event); if (eventOrder == NULL) return; int* eventTargets = dec_event_targets_get(event); int eventTargetsSize = dec_event_targets_size_get(event); if (eventTargets == NULL || eventTargetsSize == 0) { dec_event_order_free(eventOrder); return; } CGSConnection iConnection; int place = dec_event_order_place_get(eventOrder); int reference = dec_event_order_reference_get(eventOrder); /* sanity check on the passed parameters */ if (place < -1 || place > 1) return; /* fetch the connection */ iConnection = _CGSDefaultConnection(); /* carry out operation */ int i; for (i=0; i<eventTargetsSize; i++) { CGSOrderWindow(iConnection, eventTargets[i], place, reference); CGSFlushWindow(iConnection, eventTargets[i], 0); } dec_event_order_free(eventOrder); }
void orderOutWindow(int wid) { CGSConnection cid; cid = _CGSDefaultConnection(); CGSOrderWindow(cid, wid, kCGSOrderOut, 0); }