1 #ifndef __kry_region_H__ 2 #define __kry_region_H__ 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif /* __cplusplus */ 7 8 9 #define KRY_TYPE_REGION (kry_region_get_type ()) 10 #define KRY_REGION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), KRY_TYPE_REGION, KryRegion)) 11 #define KRY_REGION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), KRY_TYPE_REGION, KryRegionClass)) 12 #define KRY_IS_REGION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), KRY_TYPE_REGION)) 13 #define KRY_IS_REGION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), KRY_TYPE_REGION)) 14 #define KRY_REGION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), KRY_TYPE_REGION, KryRegionClass)) 15 16 17 typedef struct _KryRegion KryRegion; 18 typedef struct _KryRegionClass KryRegionClass; 19 20 struct _KryRegion 21 { 22 GObject parent_instance; 23 24 KryMarker *marker_start; 25 KryMarker *marker_end; 26 27 int color_id; 28 }; 29 30 struct _KryRegionClass 31 { 32 GObjectClass parent_class; 33 34 void (* changed) (KryRegion *marker); 35 void (* value_changed) (KryRegion *marker); 36 }; 37 38 39 GType kry_region_get_type (void) G_GNUC_CONST; 40 GObject* kry_region_new (KryMarker *marker_start, KryMarker *marker_end, int colorid); 41 void kry_region_changed (KryRegion *region); 42 void kry_region_value_changed (KryRegion *region, int old_val); 43 44 KryMarker *kry_region_get_marker_start(KryRegion *region); 45 KryMarker *kry_region_get_marker_end(KryRegion *region); 46 gboolean kry_region_is_highlighted(KryRegion *region); 47 int kry_region_get_colorid(KryRegion *region); 48 void kry_region_selected (KryRegion *region); 49 50 #ifdef __cplusplus 51 } 52 #endif /* __cplusplus */ 53 54 55 #endif /* __kry_region_H__ */ 56