]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtk/lablgtk_20001129-0.1.0/ml_gtkrange.c
.cvsignore files missing
[helm.git] / helm / DEVEL / lablgtk / lablgtk_20001129-0.1.0 / ml_gtkrange.c
1 /* $Id$ */
2
3 #include <string.h>
4 #include <gtk/gtk.h>
5 #include <caml/mlvalues.h>
6 #include <caml/alloc.h>
7 #include <caml/memory.h>
8 #include <caml/callback.h>
9 #include <caml/fail.h>
10
11 #include "wrappers.h"
12 #include "ml_glib.h"
13 #include "ml_gdk.h"
14 #include "ml_gtk.h"
15 #include "gtk_tags.h"
16
17 /* gtkprogress.h */
18
19 #define GtkProgress_val(val) check_cast(GTK_PROGRESS,val)
20 ML_2 (gtk_progress_set_show_text, GtkProgress_val, Bool_val, Unit)
21 ML_3 (gtk_progress_set_text_alignment, GtkProgress_val,
22       Option_val(arg2,Float_val,(GtkProgress_val(arg1))->x_align) Ignore,
23       Option_val(arg3,Float_val,(GtkProgress_val(arg1))->y_align) Ignore, Unit)
24 ML_2 (gtk_progress_set_format_string, GtkProgress_val, String_val, Unit)
25 ML_2 (gtk_progress_set_adjustment, GtkProgress_val, GtkAdjustment_val, Unit)
26 ML_4 (gtk_progress_configure, GtkProgress_val,
27       Float_val, Float_val, Float_val, Unit)
28 ML_2 (gtk_progress_set_percentage, GtkProgress_val, Float_val, Unit)
29 ML_2 (gtk_progress_set_value, GtkProgress_val, Float_val, Unit)
30 ML_1 (gtk_progress_get_value, GtkProgress_val, copy_double)
31 ML_1 (gtk_progress_get_current_percentage, GtkProgress_val, copy_double)
32 ML_2 (gtk_progress_set_activity_mode, GtkProgress_val, Bool_val, Unit)
33 ML_1 (gtk_progress_get_current_text, GtkProgress_val, Val_string)
34 Make_Extractor (gtk_progress_get, GtkProgress_val, adjustment,
35                 Val_GtkAny)
36
37 /* gtkprogressbar.h */
38
39 #define GtkProgressBar_val(val) check_cast(GTK_PROGRESS_BAR,val)
40 ML_0 (gtk_progress_bar_new, Val_GtkWidget_sink)
41 ML_1 (gtk_progress_bar_new_with_adjustment, GtkAdjustment_val,
42       Val_GtkWidget_sink)
43 ML_2 (gtk_progress_bar_set_bar_style, GtkProgressBar_val,
44       Progress_bar_style_val, Unit)
45 ML_2 (gtk_progress_bar_set_discrete_blocks, GtkProgressBar_val, Int_val, Unit)
46 ML_2 (gtk_progress_bar_set_activity_step, GtkProgressBar_val, Int_val, Unit)
47 ML_2 (gtk_progress_bar_set_activity_blocks, GtkProgressBar_val, Int_val, Unit)
48 ML_2 (gtk_progress_bar_set_orientation, GtkProgressBar_val,
49       Progress_bar_orientation_val, Unit)
50 /* ML_2 (gtk_progress_bar_update, GtkProgressBar_val, Float_val, Unit) */
51
52 /* gtkrange.h */
53
54 #define GtkRange_val(val) check_cast(GTK_RANGE,val)
55 ML_1 (gtk_range_get_adjustment, GtkRange_val, Val_GtkAny)
56 ML_2 (gtk_range_set_adjustment, GtkRange_val, GtkAdjustment_val, Unit)
57 ML_2 (gtk_range_set_update_policy, GtkRange_val, Update_type_val, Unit)
58
59 /* gtkscale.h */
60
61 #define GtkScale_val(val) check_cast(GTK_SCALE,val)
62 ML_2 (gtk_scale_set_digits, GtkScale_val, Int_val, Unit)
63 ML_2 (gtk_scale_set_draw_value, GtkScale_val, Bool_val, Unit)
64 ML_2 (gtk_scale_set_value_pos, GtkScale_val, Position_val, Unit)
65 ML_1 (gtk_scale_get_value_width, GtkScale_val, Val_int)
66 ML_1 (gtk_scale_draw_value, GtkScale_val, Unit)
67 ML_1 (gtk_hscale_new, GtkAdjustment_val, Val_GtkWidget_sink)
68 ML_1 (gtk_vscale_new, GtkAdjustment_val, Val_GtkWidget_sink)
69
70 /* gtkscrollbar.h */
71
72 ML_1 (gtk_hscrollbar_new, GtkAdjustment_val, Val_GtkWidget_sink)
73 ML_1 (gtk_vscrollbar_new, GtkAdjustment_val, Val_GtkWidget_sink)
74
75 /* gtkruler.h */
76
77 #define GtkRuler_val(val) check_cast(GTK_RULER,val)
78 ML_2 (gtk_ruler_set_metric, GtkRuler_val, Metric_type_val, Unit)
79 ML_5 (gtk_ruler_set_range, GtkRuler_val, Float_val,
80       Float_val, Float_val, Float_val, Unit)
81 Make_Extractor (gtk_ruler_get, GtkRuler_val, lower, copy_double)
82 Make_Extractor (gtk_ruler_get, GtkRuler_val, upper, copy_double)
83 Make_Extractor (gtk_ruler_get, GtkRuler_val, position, copy_double)
84 Make_Extractor (gtk_ruler_get, GtkRuler_val, max_size, copy_double)
85 ML_1 (gtk_ruler_draw_ticks, GtkRuler_val, Unit)
86 ML_1 (gtk_ruler_draw_pos, GtkRuler_val, Unit)
87 ML_0 (gtk_hruler_new, Val_GtkWidget_sink)
88 ML_0 (gtk_vruler_new, Val_GtkWidget_sink)