source: proiecte/PPPP/gdm/gui/simple-greeter/gdm-option-widget.h @ 134

Last change on this file since 134 was 134, checked in by (none), 14 years ago

gdm sources with the modifications for webcam

File size: 4.1 KB
Line 
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2008 Red Hat, Inc.
4 * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 *
20 *  Written by: Ray Strode <rstrode@redhat.com>
21 *              William Jon McCann <mccann@jhu.edu>
22 */
23
24#ifndef __GDM_OPTION_WIDGET_H
25#define __GDM_OPTION_WIDGET_H
26
27#include <glib-object.h>
28#include <gtk/gtk.h>
29
30G_BEGIN_DECLS
31
32#define GDM_TYPE_OPTION_WIDGET         (gdm_option_widget_get_type ())
33#define GDM_OPTION_WIDGET(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_OPTION_WIDGET, GdmOptionWidget))
34#define GDM_OPTION_WIDGET_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_OPTION_WIDGET, GdmOptionWidgetClass))
35#define GDM_IS_OPTION_WIDGET(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_OPTION_WIDGET))
36#define GDM_IS_OPTION_WIDGET_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_OPTION_WIDGET))
37#define GDM_OPTION_WIDGET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_OPTION_WIDGET, GdmOptionWidgetClass))
38
39typedef struct GdmOptionWidgetPrivate GdmOptionWidgetPrivate;
40
41typedef struct
42{
43        GtkAlignment             parent;
44        GdmOptionWidgetPrivate *priv;
45} GdmOptionWidget;
46
47typedef struct
48{
49        GtkAlignmentClass       parent_class;
50
51        void (* activated)      (GdmOptionWidget *widget);
52} GdmOptionWidgetClass;
53
54typedef enum {
55        GDM_OPTION_WIDGET_POSITION_TOP = 0,
56        GDM_OPTION_WIDGET_POSITION_MIDDLE,
57        GDM_OPTION_WIDGET_POSITION_BOTTOM,
58} GdmOptionWidgetPosition;
59
60GType                  gdm_option_widget_get_type               (void);
61GtkWidget *            gdm_option_widget_new                    (const char *label_text);
62
63void                   gdm_option_widget_add_item               (GdmOptionWidget *widget,
64                                                                 const char       *id,
65                                                                 const char       *name,
66                                                                 const char       *comment,
67                                                                 GdmOptionWidgetPosition position);
68
69void                   gdm_option_widget_remove_item            (GdmOptionWidget *widget,
70                                                                 const char       *id);
71
72void                   gdm_option_widget_remove_all_items       (GdmOptionWidget *widget);
73gboolean               gdm_option_widget_lookup_item            (GdmOptionWidget *widget,
74                                                                 const char       *id,
75                                                                 char            **name,
76                                                                 char            **comment,
77                                                                 GdmOptionWidgetPosition *position);
78
79char *                 gdm_option_widget_get_active_item        (GdmOptionWidget *widget);
80void                   gdm_option_widget_set_active_item        (GdmOptionWidget *widget,
81                                                                 const char       *item);
82char *                 gdm_option_widget_get_default_item       (GdmOptionWidget *widget);
83void                   gdm_option_widget_set_default_item       (GdmOptionWidget *widget,
84                                                                 const char       *item);
85G_END_DECLS
86
87#endif /* __GDM_OPTION_WIDGET_H */
Note: See TracBrowser for help on using the repository browser.