2007-12-24 00:14:39 +00:00
|
|
|
/*
|
|
|
|
* @file libsexy/sexy-icon-entry.h Entry widget
|
|
|
|
*
|
|
|
|
* @Copyright (C) 2004-2006 Christian Hammond.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
#ifndef _SEXY_ICON_ENTRY_H_
|
|
|
|
#define _SEXY_ICON_ENTRY_H_
|
|
|
|
|
|
|
|
typedef struct _SexyIconEntry SexyIconEntry;
|
|
|
|
typedef struct _SexyIconEntryClass SexyIconEntryClass;
|
|
|
|
typedef struct _SexyIconEntryPriv SexyIconEntryPriv;
|
|
|
|
|
2008-10-31 18:25:21 +00:00
|
|
|
#include <gtk/gtk.h>
|
2007-12-24 00:14:39 +00:00
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
#define SEXY_TYPE_ICON_ENTRY ( sexy_icon_entry_get_type( ) )
|
|
|
|
#define SEXY_ICON_ENTRY( obj ) \
|
|
|
|
( G_TYPE_CHECK_INSTANCE_CAST( ( obj ), SEXY_TYPE_ICON_ENTRY,\
|
|
|
|
SexyIconEntry ) )
|
|
|
|
#define SEXY_ICON_ENTRY_CLASS( klass ) \
|
|
|
|
( G_TYPE_CHECK_CLASS_CAST( ( klass ), SEXY_TYPE_ICON_ENTRY,\
|
|
|
|
SexyIconEntryClass ) )
|
|
|
|
#define SEXY_IS_ICON_ENTRY( obj ) \
|
|
|
|
( G_TYPE_CHECK_INSTANCE_TYPE( ( obj ), SEXY_TYPE_ICON_ENTRY ) )
|
|
|
|
#define SEXY_IS_ICON_ENTRY_CLASS( klass ) \
|
|
|
|
( G_TYPE_CHECK_CLASS_TYPE( ( klass ), SEXY_TYPE_ICON_ENTRY ) )
|
|
|
|
#define SEXY_ICON_ENTRY_GET_CLASS( obj ) \
|
|
|
|
( G_TYPE_INSTANCE_GET_CLASS ( ( obj ), SEXY_TYPE_ICON_ENTRY,\
|
|
|
|
SexyIconEntryClass ) )
|
2007-12-24 00:14:39 +00:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2008-09-23 19:11:04 +00:00
|
|
|
SEXY_ICON_ENTRY_PRIMARY,
|
|
|
|
SEXY_ICON_ENTRY_SECONDARY
|
2007-12-24 00:14:39 +00:00
|
|
|
} SexyIconEntryPosition;
|
|
|
|
|
|
|
|
struct _SexyIconEntry
|
|
|
|
{
|
2008-09-23 19:11:04 +00:00
|
|
|
GtkEntry parent_object;
|
2007-12-24 00:14:39 +00:00
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
SexyIconEntryPriv * priv;
|
2007-12-24 00:14:39 +00:00
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
void ( *gtk_reserved1 )( void );
|
|
|
|
void ( *gtk_reserved2 )( void );
|
|
|
|
void ( *gtk_reserved3 )( void );
|
|
|
|
void ( *gtk_reserved4 )( void );
|
2007-12-24 00:14:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _SexyIconEntryClass
|
|
|
|
{
|
2008-09-23 19:11:04 +00:00
|
|
|
GtkEntryClass parent_class;
|
|
|
|
|
|
|
|
/* Signals */
|
|
|
|
void ( *icon_pressed )( SexyIconEntry * entry,
|
|
|
|
SexyIconEntryPosition icon_pos,
|
|
|
|
int button );
|
|
|
|
void ( *icon_released )( SexyIconEntry * entry,
|
|
|
|
SexyIconEntryPosition icon_pos,
|
|
|
|
int button );
|
|
|
|
|
|
|
|
void ( *gtk_reserved1 )( void );
|
|
|
|
void ( *gtk_reserved2 )( void );
|
|
|
|
void ( *gtk_reserved3 )( void );
|
|
|
|
void ( *gtk_reserved4 )( void );
|
2007-12-24 00:14:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
GType sexy_icon_entry_get_type( void );
|
|
|
|
|
|
|
|
GtkWidget *sexy_icon_entry_new( void );
|
2007-12-24 00:14:39 +00:00
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
void sexy_icon_entry_set_icon( SexyIconEntry * entry,
|
|
|
|
SexyIconEntryPosition position,
|
|
|
|
GtkImage * icon );
|
2007-12-24 00:14:39 +00:00
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
void sexy_icon_entry_set_icon_highlight(
|
|
|
|
SexyIconEntry *entry,
|
|
|
|
SexyIconEntryPosition
|
|
|
|
position,
|
|
|
|
gboolean
|
|
|
|
highlight );
|
2007-12-24 00:14:39 +00:00
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
GtkImage * sexy_icon_entry_get_icon( const SexyIconEntry * entry,
|
|
|
|
SexyIconEntryPosition position );
|
2007-12-24 00:14:39 +00:00
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
gboolean sexy_icon_entry_get_icon_highlight(
|
|
|
|
const SexyIconEntry *entry,
|
|
|
|
SexyIconEntryPosition
|
|
|
|
position );
|
2007-12-24 00:14:39 +00:00
|
|
|
|
2008-09-23 19:11:04 +00:00
|
|
|
void sexy_icon_entry_add_clear_button( SexyIconEntry *icon_entry );
|
2007-12-24 00:14:39 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* _SEXY_ICON_ENTRY_H_ */
|