1 /* util header */ 2 /* vim: set sw=2 et: */ 3 4 /* 5 * Copyright (C) 2001 Havoc Pennington 6 * Copyright (C) 2003 Red Hat, Inc. 7 * Copyright (C) 2006-2007 Vincent Untz 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Library General Public 11 * License as published by the Free Software Foundation; either 12 * version 2 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Library General Public License for more details. 18 * 19 * You should have received a copy of the GNU Library General Public 20 * License along with this library; if not, write to the 21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 * Boston, MA 02111-1307, USA. 23 */ 24 25 #ifndef WNCK_UTIL_H 26 #define WNCK_UTIL_H 27 28 #include <gtk/gtk.h> 29 30 typedef struct _WnckResourceUsage WnckResourceUsage; 31 32 /** 33 * WnckResourceUsage: 34 * @total_bytes_estimate: estimation of the total number of bytes allocated in 35 * the X server. 36 * @pixmap_bytes: number of bytes allocated in the X server for resources of 37 * type Pixmap. 38 * @n_pixmaps: number of Pixmap resources allocated. 39 * @n_windows: number of Window resources allocated. 40 * @n_gcs: number of GContext resources allocated. 41 * @n_pictures: number of Picture resources allocated. 42 * @n_glyphsets: number of Glyphset resources allocated. 43 * @n_fonts: number of Font resources allocated. 44 * @n_colormap_entries: number of Colormap resources allocated. 45 * @n_passive_grabs: number of PassiveGrab resources allocated. 46 * @n_cursors: number of Cursor resources allocated. 47 * @n_other: number of other resources allocated. 48 * 49 * The #WnckResourceUsage struct contains information about the total resource 50 * usage of an X client, and the number of resources allocated for each 51 * resource type. 52 * 53 * Since: 2.6 54 */ 55 struct _WnckResourceUsage 56 { 57 gulong total_bytes_estimate; 58 59 gulong pixmap_bytes; 60 61 unsigned int n_pixmaps; 62 unsigned int n_windows; 63 unsigned int n_gcs; 64 unsigned int n_pictures; 65 unsigned int n_glyphsets; 66 unsigned int n_fonts; 67 unsigned int n_colormap_entries; 68 unsigned int n_passive_grabs; 69 unsigned int n_cursors; 70 unsigned int n_other; 71 72 /*< private >*/ 73 unsigned int pad1; 74 unsigned int pad2; 75 unsigned int pad3; 76 unsigned int pad4; 77 unsigned int pad5; 78 unsigned long pad6; 79 unsigned long pad7; 80 unsigned long pad8; 81 unsigned long pad9; 82 }; 83 84 /** 85 * WnckClientType: 86 * @WNCK_CLIENT_TYPE_APPLICATION: the libwnck user is a normal application. 87 * @WNCK_CLIENT_TYPE_PAGER: the libwnck user is an utility application dealing 88 * with window management, like pagers and taskbars. 89 * 90 * Type describing the role of the libwnck user. 91 * 92 * Since: 2.14 93 */ 94 typedef enum { 95 WNCK_CLIENT_TYPE_APPLICATION = 1, 96 WNCK_CLIENT_TYPE_PAGER = 2 97 } WnckClientType; 98 99 void wnck_set_client_type (WnckClientType ewmh_sourceindication_client_type); 100 101 void wnck_xid_read_resource_usage (GdkDisplay *gdk_display, 102 gulong xid, 103 WnckResourceUsage *usage); 104 105 void wnck_pid_read_resource_usage (GdkDisplay *gdk_display, 106 gulong pid, 107 WnckResourceUsage *usage); 108 109 110 #ifndef WNCK_DISABLE_DEPRECATED 111 void wnck_gtk_window_set_dock_type (GtkWindow *window); 112 #endif /* WNCK_DISABLE_DEPRECATED */ 113 114 #endif /* WNCK_UTIL_H */ 115 116 117