|
Packit |
4e910c |
/* util header */
|
|
Packit |
4e910c |
/* vim: set sw=2 et: */
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
/*
|
|
Packit |
4e910c |
* Copyright (C) 2001 Havoc Pennington
|
|
Packit |
4e910c |
* Copyright (C) 2003 Red Hat, Inc.
|
|
Packit |
4e910c |
* Copyright (C) 2006-2007 Vincent Untz
|
|
Packit |
4e910c |
*
|
|
Packit |
4e910c |
* This library is free software; you can redistribute it and/or
|
|
Packit |
4e910c |
* modify it under the terms of the GNU Library General Public
|
|
Packit |
4e910c |
* License as published by the Free Software Foundation; either
|
|
Packit |
4e910c |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
4e910c |
*
|
|
Packit |
4e910c |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
4e910c |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
4e910c |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
4e910c |
* Library General Public License for more details.
|
|
Packit |
4e910c |
*
|
|
Packit |
4e910c |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
4e910c |
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
4e910c |
*/
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
#if !defined (__LIBWNCK_H_INSIDE__) && !defined (WNCK_COMPILATION)
|
|
Packit |
4e910c |
#error "Only <libwnck/libwnck.h> can be included directly."
|
|
Packit |
4e910c |
#endif
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
#ifndef WNCK_UTIL_H
|
|
Packit |
4e910c |
#define WNCK_UTIL_H
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
#include <gtk/gtk.h>
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
G_BEGIN_DECLS
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
typedef struct _WnckResourceUsage WnckResourceUsage;
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
/**
|
|
Packit |
4e910c |
* WnckResourceUsage:
|
|
Packit |
4e910c |
* @total_bytes_estimate: estimation of the total number of bytes allocated in
|
|
Packit |
4e910c |
* the X server.
|
|
Packit |
4e910c |
* @pixmap_bytes: number of bytes allocated in the X server for resources of
|
|
Packit |
4e910c |
* type Pixmap.
|
|
Packit |
4e910c |
* @n_pixmaps: number of Pixmap resources allocated.
|
|
Packit |
4e910c |
* @n_windows: number of Window resources allocated.
|
|
Packit |
4e910c |
* @n_gcs: number of GContext resources allocated.
|
|
Packit |
4e910c |
* @n_pictures: number of Picture resources allocated.
|
|
Packit |
4e910c |
* @n_glyphsets: number of Glyphset resources allocated.
|
|
Packit |
4e910c |
* @n_fonts: number of Font resources allocated.
|
|
Packit |
4e910c |
* @n_colormap_entries: number of Colormap resources allocated.
|
|
Packit |
4e910c |
* @n_passive_grabs: number of PassiveGrab resources allocated.
|
|
Packit |
4e910c |
* @n_cursors: number of Cursor resources allocated.
|
|
Packit |
4e910c |
* @n_other: number of other resources allocated.
|
|
Packit |
4e910c |
*
|
|
Packit |
4e910c |
* The #WnckResourceUsage struct contains information about the total resource
|
|
Packit |
4e910c |
* usage of an X client, and the number of resources allocated for each
|
|
Packit |
4e910c |
* resource type.
|
|
Packit |
4e910c |
*
|
|
Packit |
4e910c |
* Since: 2.6
|
|
Packit |
4e910c |
*/
|
|
Packit |
4e910c |
struct _WnckResourceUsage
|
|
Packit |
4e910c |
{
|
|
Packit |
4e910c |
gulong total_bytes_estimate;
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
gulong pixmap_bytes;
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
unsigned int n_pixmaps;
|
|
Packit |
4e910c |
unsigned int n_windows;
|
|
Packit |
4e910c |
unsigned int n_gcs;
|
|
Packit |
4e910c |
unsigned int n_pictures;
|
|
Packit |
4e910c |
unsigned int n_glyphsets;
|
|
Packit |
4e910c |
unsigned int n_fonts;
|
|
Packit |
4e910c |
unsigned int n_colormap_entries;
|
|
Packit |
4e910c |
unsigned int n_passive_grabs;
|
|
Packit |
4e910c |
unsigned int n_cursors;
|
|
Packit |
4e910c |
unsigned int n_other;
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
/*< private >*/
|
|
Packit |
4e910c |
unsigned int pad1;
|
|
Packit |
4e910c |
unsigned int pad2;
|
|
Packit |
4e910c |
unsigned int pad3;
|
|
Packit |
4e910c |
unsigned int pad4;
|
|
Packit |
4e910c |
unsigned int pad5;
|
|
Packit |
4e910c |
unsigned long pad6;
|
|
Packit |
4e910c |
unsigned long pad7;
|
|
Packit |
4e910c |
unsigned long pad8;
|
|
Packit |
4e910c |
unsigned long pad9;
|
|
Packit |
4e910c |
};
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
/**
|
|
Packit |
4e910c |
* WnckClientType:
|
|
Packit |
4e910c |
* @WNCK_CLIENT_TYPE_APPLICATION: the libwnck user is a normal application.
|
|
Packit |
4e910c |
* @WNCK_CLIENT_TYPE_PAGER: the libwnck user is an utility application dealing
|
|
Packit |
4e910c |
* with window management, like pagers and taskbars.
|
|
Packit |
4e910c |
*
|
|
Packit |
4e910c |
* Type describing the role of the libwnck user.
|
|
Packit |
4e910c |
*
|
|
Packit |
4e910c |
* Since: 2.14
|
|
Packit |
4e910c |
*/
|
|
Packit |
4e910c |
typedef enum {
|
|
Packit |
4e910c |
WNCK_CLIENT_TYPE_APPLICATION = 1,
|
|
Packit |
4e910c |
WNCK_CLIENT_TYPE_PAGER = 2
|
|
Packit |
4e910c |
} WnckClientType;
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
void wnck_set_client_type (WnckClientType ewmh_sourceindication_client_type);
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
#define WNCK_DEFAULT_ICON_SIZE 32
|
|
Packit |
4e910c |
#define WNCK_DEFAULT_MINI_ICON_SIZE 16
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
void wnck_set_default_icon_size (gsize size);
|
|
Packit |
4e910c |
void wnck_set_default_mini_icon_size (gsize size);
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
void wnck_shutdown (void);
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
void wnck_xid_read_resource_usage (GdkDisplay *gdk_display,
|
|
Packit |
4e910c |
gulong xid,
|
|
Packit |
4e910c |
WnckResourceUsage *usage);
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
void wnck_pid_read_resource_usage (GdkDisplay *gdk_display,
|
|
Packit |
4e910c |
gulong pid,
|
|
Packit |
4e910c |
WnckResourceUsage *usage);
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
G_END_DECLS
|
|
Packit |
4e910c |
|
|
Packit |
4e910c |
#endif /* WNCK_UTIL_H */
|