2006-01-11 Sebastien Bacher <seb128@debian.org> reviewed by: Bastien Nocera <hadess@hadess.net> * actions/acme-fb-level.c: (acme_fblevel_error_quark), (acme_fblevel_new): * actions/acme-fb-level.h: * gnome-settings-multimedia-keys.c: (gnome_settings_multimedia_keys_load): cleanup messages about pmu on powerbook, patch by Jeroen Zwartepoorte <jeroen.zwartepoorte@gmail.com> (Closes: #132655)
65 lines
2.3 KiB
C
65 lines
2.3 KiB
C
/* acme-fb-level.c
|
|
|
|
Copyright (C) 2002, 2003 Bastien Nocera
|
|
|
|
The Gnome Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public License as
|
|
published by the Free Software Foundation; either version 2 of the
|
|
License, or (at your option) any later version.
|
|
|
|
The Gnome Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with the Gnome Library; see the file COPYING.LIB. If not,
|
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA.
|
|
|
|
Author: Bastien Nocera <hadess@hadess.net>
|
|
*/
|
|
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
|
|
#define ACME_TYPE_FBLEVEL (acme_fblevel_get_type ())
|
|
#define ACME_FBLEVEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACME_TYPE_FBLEVEL, AcmeFblevel))
|
|
#define ACME_FBLEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACME_TYPE_FBLEVEL, AcmeFblevelClass))
|
|
#define ACME_IS_FBLEVEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACME_TYPE_FBLEVEL))
|
|
#define ACME_FBLEVEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACME_TYPE_FBLEVEL, AcmeFblevelClass))
|
|
|
|
#define ACME_FBLEVEL_ERROR (acme_fblevel_error_quark ())
|
|
|
|
typedef struct AcmeFblevelPrivate AcmeFblevelPrivate;
|
|
typedef struct AcmeFblevel AcmeFblevel;
|
|
typedef struct AcmeFblevelClass AcmeFblevelClass;
|
|
typedef enum AcmeFblevelError AcmeFblevelError;
|
|
|
|
struct AcmeFblevel {
|
|
GObject parent;
|
|
int level;
|
|
gboolean dim;
|
|
AcmeFblevelPrivate *_priv;
|
|
};
|
|
|
|
struct AcmeFblevelClass {
|
|
GObjectClass parent;
|
|
};
|
|
|
|
enum AcmeFblevelError {
|
|
ACME_FBLEVEL_ERROR_NO_PMU_DEVICE,
|
|
ACME_FBLEVEL_ERROR_NO_POWERBOOK,
|
|
ACME_FBLEVEL_ERROR_WRONG_PERMS
|
|
};
|
|
|
|
GType acme_fblevel_get_type (void);
|
|
GQuark acme_fblevel_error_quark (void);
|
|
int acme_fblevel_get_level (AcmeFblevel *self);
|
|
void acme_fblevel_set_level (AcmeFblevel *self, int val);
|
|
gboolean acme_fblevel_get_dim (AcmeFblevel *self);
|
|
void acme_fblevel_set_dim (AcmeFblevel *self,
|
|
gboolean val);
|
|
AcmeFblevel *acme_fblevel_new (GError **error);
|
|
gboolean acme_fblevel_is_powerbook (void);
|
|
|