]> Dogcows Code - chaz/openbox/blob - openbox/client_time_heap.h
get rid of global client_last_user_time variable.
[chaz/openbox] / openbox / client_time_heap.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3 client_time_heap.h for the Openbox window manager
4 Copyright (c) 2006 Mikael Magnusson
5 Copyright (c) 2003-2007 Dana Jansens
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 See the COPYING file for a copy of the GNU General Public License.
18 */
19
20 #ifndef __client_time_heap_h
21 #define __client_time_heap_h
22
23 #include <glib.h>
24
25 struct _ObClient *client;
26
27 typedef struct _ObClientTimeHeap ObClientTimeHeap;
28 typedef struct _ObClientTimeHeapNode ObClientTimeHeapNode;
29
30 /*! A min-heap of the clients based on their user_time as the key */
31 struct _ObClientTimeHeap
32 {
33 /* The nodes in the heap */
34 GPtrArray *nodes;
35 };
36
37 ObClientTimeHeap* client_time_heap_new ();
38 void client_time_heap_free (ObClientTimeHeap *h);
39
40 guint32 client_time_heap_maximum (ObClientTimeHeap *h);
41
42 void client_time_heap_add (ObClientTimeHeap *h,
43 struct _ObClient *c);
44 void client_time_heap_remove (ObClientTimeHeap *h,
45 struct _ObClient *c);
46 void client_time_heap_decrease_key (ObClientTimeHeap *h,
47 struct _ObClient *c);
48 void client_time_heap_increase_key (ObClientTimeHeap *h,
49 struct _ObClient *c);
50
51 #endif
This page took 0.039749 seconds and 5 git commands to generate.