summaryrefslogtreecommitdiff
path: root/applets/clock/clock-location-tile.h
diff options
context:
space:
mode:
Diffstat (limited to 'applets/clock/clock-location-tile.h')
-rw-r--r--applets/clock/clock-location-tile.h30
1 files changed, 8 insertions, 22 deletions
diff --git a/applets/clock/clock-location-tile.h b/applets/clock/clock-location-tile.h
index 62bc160c..ac0f7cb2 100644
--- a/applets/clock/clock-location-tile.h
+++ b/applets/clock/clock-location-tile.h
@@ -8,31 +8,18 @@
#include "clock-location.h"
#include "clock-utils.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CLOCK_LOCATION_TILE_TYPE (clock_location_tile_get_type ())
-#define CLOCK_LOCATION_TILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CLOCK_LOCATION_TILE_TYPE, ClockLocationTile))
-#define CLOCK_LOCATION_TILE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), CLOCK_LOCATION_TILE_TYPE, ClockLocationTileClass))
-#define IS_CLOCK_LOCATION_TILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CLOCK_LOCATION_TILE_TYPE))
-#define IS_CLOCK_LOCATION_TILE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), CLOCK_LOCATION_TILE_TYPE))
-#define CLOCK_LOCATION_TILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CLOCK_LOCATION_TILE_TYPE, ClockLocationTileClass))
-
-typedef struct
-{
- GtkBin parent;
-} ClockLocationTile;
+G_BEGIN_DECLS
+
+#define CLOCK_TYPE_LOCATION_TILE (clock_location_tile_get_type ())
+G_DECLARE_DERIVABLE_TYPE (ClockLocationTile, clock_location_tile, CLOCK, LOCATION_TILE, GtkBin)
-typedef struct
+struct _ClockLocationTileClass
{
GtkBinClass parent_class;
void (* tile_pressed) (ClockLocationTile *tile);
int (* need_clock_format) (ClockLocationTile *tile);
-} ClockLocationTileClass;
-
-GType clock_location_tile_get_type (void);
+};
ClockLocationTile *clock_location_tile_new (ClockLocation *loc,
ClockFaceSize size);
@@ -45,7 +32,6 @@ void weather_info_setup_tooltip (GWeatherInfo *info, ClockLocation *location, Gt
void clock_location_tile_refresh (ClockLocationTile *this,
gboolean force_refresh);
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
+
#endif /* __CLOCK_H__ */