source: trunk/gtk/sexy-icon-entry.h @ 6998

Last change on this file since 6998 was 6998, checked in by charles, 14 years ago

(gtk) don't use code marked as deprecated in gtk 2.14

  • Property svn:keywords set to Date Rev Author Id
File size: 3.7 KB
Line 
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
24typedef struct _SexyIconEntry      SexyIconEntry;
25typedef struct _SexyIconEntryClass SexyIconEntryClass;
26typedef struct _SexyIconEntryPriv  SexyIconEntryPriv;
27
28#include <gtk/gtk.h>
29
30#define SEXY_TYPE_ICON_ENTRY ( sexy_icon_entry_get_type( ) )
31#define SEXY_ICON_ENTRY( obj ) \
32    ( G_TYPE_CHECK_INSTANCE_CAST( ( obj ), SEXY_TYPE_ICON_ENTRY,\
33                                 SexyIconEntry ) )
34#define SEXY_ICON_ENTRY_CLASS( klass ) \
35    ( G_TYPE_CHECK_CLASS_CAST( ( klass ), SEXY_TYPE_ICON_ENTRY,\
36                              SexyIconEntryClass ) )
37#define SEXY_IS_ICON_ENTRY( obj ) \
38    ( G_TYPE_CHECK_INSTANCE_TYPE( ( obj ), SEXY_TYPE_ICON_ENTRY ) )
39#define SEXY_IS_ICON_ENTRY_CLASS( klass ) \
40    ( G_TYPE_CHECK_CLASS_TYPE( ( klass ), SEXY_TYPE_ICON_ENTRY ) )
41#define SEXY_ICON_ENTRY_GET_CLASS( obj ) \
42    ( G_TYPE_INSTANCE_GET_CLASS ( ( obj ), SEXY_TYPE_ICON_ENTRY,\
43                                 SexyIconEntryClass ) )
44
45typedef enum
46{
47    SEXY_ICON_ENTRY_PRIMARY,
48    SEXY_ICON_ENTRY_SECONDARY
49} SexyIconEntryPosition;
50
51struct _SexyIconEntry
52{
53    GtkEntry             parent_object;
54
55    SexyIconEntryPriv *  priv;
56
57    void                 ( *gtk_reserved1 )( void );
58    void                 ( *gtk_reserved2 )( void );
59    void                 ( *gtk_reserved3 )( void );
60    void                 ( *gtk_reserved4 )( void );
61};
62
63struct _SexyIconEntryClass
64{
65    GtkEntryClass    parent_class;
66
67    /* Signals */
68    void    ( *icon_pressed )( SexyIconEntry *       entry,
69                               SexyIconEntryPosition icon_pos,
70                               int                   button );
71    void    ( *icon_released )( SexyIconEntry *       entry,
72                                SexyIconEntryPosition icon_pos,
73                                int                   button );
74
75    void    ( *gtk_reserved1 )( void );
76    void    ( *gtk_reserved2 )( void );
77    void    ( *gtk_reserved3 )( void );
78    void    ( *gtk_reserved4 )( void );
79};
80
81G_BEGIN_DECLS
82
83GType      sexy_icon_entry_get_type( void );
84
85GtkWidget *sexy_icon_entry_new( void );
86
87void       sexy_icon_entry_set_icon( SexyIconEntry *       entry,
88                                     SexyIconEntryPosition position,
89                                     GtkImage *            icon );
90
91void       sexy_icon_entry_set_icon_highlight(
92    SexyIconEntry *entry,
93    SexyIconEntryPosition
94                   position,
95    gboolean
96                   highlight );
97
98GtkImage * sexy_icon_entry_get_icon( const SexyIconEntry * entry,
99                                     SexyIconEntryPosition position );
100
101gboolean   sexy_icon_entry_get_icon_highlight(
102    const SexyIconEntry *entry,
103    SexyIconEntryPosition
104                         position );
105
106void       sexy_icon_entry_add_clear_button( SexyIconEntry *icon_entry );
107
108G_END_DECLS
109
110#endif /* _SEXY_ICON_ENTRY_H_ */
Note: See TracBrowser for help on using the repository browser.