~ubuntu-branches/ubuntu/quantal/xarchiver/quantal

« back to all changes in this revision

Viewing changes to src/sexy-icon-entry.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-11-07 14:54:00 UTC
  • mfrom: (1.1.7 upstream) (2.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20081107145400-z0j3jmgads8coae2
Tags: 0.5.1-1
MergingĀ upstreamĀ versionĀ 0.5.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * @file libsexy/sexy-icon-entry.h Entry widget
 
3
 *
 
4
 * @Copyright (C) 2004-2006 Christian Hammond.
 
5
 *
 
6
 * This library is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU Lesser General Public
 
8
 * License as published by the Free Software Foundation; either
 
9
 * version 2 of the License, or (at your option) any later version.
 
10
 *
 
11
 * This library 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 GNU
 
14
 * Lesser General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public
 
17
 * License along with this library; if not, write to the
 
18
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
19
 * Boston, MA  02111-1307, USA.
 
20
 */
 
21
#ifndef _SEXY_ICON_ENTRY_H_
 
22
#define _SEXY_ICON_ENTRY_H_
 
23
 
 
24
typedef struct _SexyIconEntry      SexyIconEntry;
 
25
typedef struct _SexyIconEntryClass SexyIconEntryClass;
 
26
typedef struct _SexyIconEntryPriv  SexyIconEntryPriv;
 
27
 
 
28
#include <gtk/gtkentry.h>
 
29
#include <gtk/gtkimage.h>
 
30
 
 
31
#define SEXY_TYPE_ICON_ENTRY (sexy_icon_entry_get_type())
 
32
#define SEXY_ICON_ENTRY(obj) \
 
33
                (G_TYPE_CHECK_INSTANCE_CAST((obj), SEXY_TYPE_ICON_ENTRY, SexyIconEntry))
 
34
#define SEXY_ICON_ENTRY_CLASS(klass) \
 
35
                (G_TYPE_CHECK_CLASS_CAST((klass), SEXY_TYPE_ICON_ENTRY, SexyIconEntryClass))
 
36
#define SEXY_IS_ICON_ENTRY(obj) \
 
37
                (G_TYPE_CHECK_INSTANCE_TYPE((obj), SEXY_TYPE_ICON_ENTRY))
 
38
#define SEXY_IS_ICON_ENTRY_CLASS(klass) \
 
39
                (G_TYPE_CHECK_CLASS_TYPE((klass), SEXY_TYPE_ICON_ENTRY))
 
40
#define SEXY_ICON_ENTRY_GET_CLASS(obj) \
 
41
                (G_TYPE_INSTANCE_GET_CLASS ((obj), SEXY_TYPE_ICON_ENTRY, SexyIconEntryClass))
 
42
 
 
43
typedef enum
 
44
{
 
45
        SEXY_ICON_ENTRY_PRIMARY,
 
46
        SEXY_ICON_ENTRY_SECONDARY
 
47
 
 
48
} SexyIconEntryPosition;
 
49
 
 
50
struct _SexyIconEntry
 
51
{
 
52
        GtkEntry parent_object;
 
53
 
 
54
        SexyIconEntryPriv *priv;
 
55
 
 
56
        void (*gtk_reserved1)(void);
 
57
        void (*gtk_reserved2)(void);
 
58
        void (*gtk_reserved3)(void);
 
59
        void (*gtk_reserved4)(void);
 
60
};
 
61
 
 
62
struct _SexyIconEntryClass
 
63
{
 
64
        GtkEntryClass parent_class;
 
65
 
 
66
        /* Signals */
 
67
        void (*icon_pressed)(SexyIconEntry *entry, SexyIconEntryPosition icon_pos,
 
68
                                                 int button);
 
69
        void (*icon_released)(SexyIconEntry *entry, SexyIconEntryPosition icon_pos,
 
70
                                                  int button);
 
71
 
 
72
        void (*gtk_reserved1)(void);
 
73
        void (*gtk_reserved2)(void);
 
74
        void (*gtk_reserved3)(void);
 
75
        void (*gtk_reserved4)(void);
 
76
};
 
77
 
 
78
G_BEGIN_DECLS
 
79
 
 
80
GType sexy_icon_entry_get_type(void);
 
81
 
 
82
GtkWidget *sexy_icon_entry_new(void);
 
83
 
 
84
void sexy_icon_entry_set_icon(SexyIconEntry *entry,
 
85
                                                          SexyIconEntryPosition position,
 
86
                                                          GtkImage *icon);
 
87
 
 
88
void sexy_icon_entry_set_icon_highlight(SexyIconEntry *entry,
 
89
                                                                                SexyIconEntryPosition position,
 
90
                                                                                gboolean highlight);
 
91
 
 
92
GtkImage *sexy_icon_entry_get_icon(const SexyIconEntry *entry,
 
93
                                                                   SexyIconEntryPosition position);
 
94
 
 
95
gboolean sexy_icon_entry_get_icon_highlight(const SexyIconEntry *entry,
 
96
                                                                                        SexyIconEntryPosition position);
 
97
void sexy_icon_entry_add_clear_button(SexyIconEntry *icon_entry,gpointer, gpointer);
 
98
 
 
99
G_END_DECLS
 
100
 
 
101
#endif /* _SEXY_ICON_ENTRY_H_ */