grim/guifications3
Clone
Summary
Browse
Changes
Graph
removed some ENABLE_NLS wrappers
2011-05-17, Gary Kramlich
f31281edef1c
removed some ENABLE_NLS wrappers
/*
* Guifications - The end-all, be-all notification framework
* Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GF_ITEM_H
#define GF_ITEM_H
#define GF_TYPE_ITEM (gf_item_get_gtype())
#define GF_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GF_TYPE_ITEM, GfItem))
#define GF_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GF_TYPE_ITEM, GfItemClass))
#define GF_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GF_TYPE_ITEM))
#define GF_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GF_TYPE_ITEM))
#define GF_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GF_TYPE_ITEM, GfItemClass))
typedef
struct
_GfItem
GfItem
;
typedef
struct
_GfItemClass
GfItemClass
;
#define GF_TYPE_ITEM_POSITION (gf_item_position_get_gtype())
typedef
enum
_GfItemPosition
{
GF_ITEM_POSITION_UNKNOWN
=
0
,
GF_ITEM_POSITION_NW
,
GF_ITEM_POSITION_N
,
GF_ITEM_POSITION_NE
,
GF_ITEM_POSITION_W
,
GF_ITEM_POSITION_C
,
GF_ITEM_POSITION_E
,
GF_ITEM_POSITION_SW
,
GF_ITEM_POSITION_S
,
GF_ITEM_POSITION_SE
,
GF_ITEM_POSITION_NORTH_WEST
=
GF_ITEM_POSITION_NW
,
GF_ITEM_POSITION_NORTH
=
GF_ITEM_POSITION_N
,
GF_ITEM_POSITION_NORTH_EAST
=
GF_ITEM_POSITION_NE
,
GF_ITEM_POSITION_WEST
=
GF_ITEM_POSITION_W
,
GF_ITEM_POSITION_CENTER
=
GF_ITEM_POSITION_C
,
GF_ITEM_POSITION_EAST
=
GF_ITEM_POSITION_E
,
GF_ITEM_POSITION_SOUTH_WEST
=
GF_ITEM_POSITION_SW
,
GF_ITEM_POSITION_SOUTH
=
GF_ITEM_POSITION_S
,
GF_ITEM_POSITION_SOUTH_EAST
=
GF_ITEM_POSITION_SE
,
GF_ITEM_POSITIONS
}
GfItemPosition
;
#include
<gflib/gf_enum.h>
#include
<gflib/gf_event_info.h>
#include
<gflib/gf_object.h>
#include
<gflib-ui/gf_drawable.h>
#include
<gflib-ui/gf_notification.h>
struct
_GfItem
{
GfObject
parent
;
void
(
*
_gf_reserved1
)(
void
);
void
(
*
_gf_reserved2
)(
void
);
void
(
*
_gf_reserved3
)(
void
);
void
(
*
_gf_reserved4
)(
void
);
};
struct
_GfItemClass
{
GfObjectClass
parent
;
gboolean
positionable
;
void
(
*
render
)(
const
GfItem
*
item
,
GfDrawable
*
drawable
);
void
(
*
_gf_reserved1
)(
void
);
void
(
*
_gf_reserved2
)(
void
);
void
(
*
_gf_reserved3
)(
void
);
void
(
*
_gf_reserved4
)(
void
);
};
G_BEGIN_DECLS
GType
gf_item_get_gtype
(
void
);
void
gf_item_set_notification
(
GfItem
*
item
,
GfNotification
*
notification
);
GfNotification
*
gf_item_get_notification
(
const
GfItem
*
item
);
void
gf_item_set_position
(
GfItem
*
item
,
GfItemPosition
position
);
GfItemPosition
gf_item_get_position
(
const
GfItem
*
item
);
void
gf_item_set_horizontal_offset_value
(
GfItem
*
item
,
gint
offset
);
gint
gf_item_get_horizontal_offset_value
(
const
GfItem
*
item
);
void
gf_item_set_horizontal_offset_percentage
(
GfItem
*
item
,
gboolean
percentage
);
gboolean
gf_item_get_horizontal_offset_percentage
(
const
GfItem
*
item
);
void
gf_item_set_vertical_offset_value
(
GfItem
*
item
,
gint
offset
);
gint
gf_item_get_vertical_offset_value
(
const
GfItem
*
item
);
void
gf_item_set_vertical_offset_percentage
(
GfItem
*
item
,
gboolean
percentage
);
gboolean
gf_item_get_vertical_offset_percentage
(
const
GfItem
*
item
);
void
gf_item_get_render_position
(
const
GfItem
*
item
,
gint
*
x
,
gint
*
y
,
gint
width
,
gint
height
,
gint
dest_width
,
gint
dest_height
);
void
gf_item_render
(
const
GfItem
*
item
,
GfDrawable
*
drawable
);
GType
gf_item_position_get_gtype
(
void
);
#define gf_item_position_from_string(str) \
gf_enum_from_string(GF_TYPE_ITEM_POSITION, (str))
#define gf_item_position_to_string(position, i18n) \
gf_enum_to_string(GF_TYPE_ITEM_POSITION, (position), (i18n))
G_END_DECLS
#endif
/* GF_ITEM_H */