PageRenderTime 103ms CodeModel.GetById 81ms app.highlight 12ms RepoModel.GetById 6ms app.codeStats 0ms

/packages/gtk1/src/gtk/gtkaccellabel.pp

https://github.com/slibre/freepascal
Puppet | 87 lines | 66 code | 21 blank | 0 comment | 0 complexity | 5320d5b646e9b9c9b789a20f96258872 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1{
 2}
 3
 4{****************************************************************************
 5                                 Interface
 6****************************************************************************}
 7
 8{$ifdef read_interface}
 9
10  type
11     PGtkAccelLabel = ^TGtkAccelLabel;
12     TGtkAccelLabel = record
13          _label : TGtkLabel;
14          queue_id : guint;
15          accel_padding : guint;
16          accel_widget : PGtkWidget;
17          accel_string : Pgchar;
18          accel_string_width : guint16;
19       end;
20
21     PGtkAccelLabelClass = ^TGtkAccelLabelClass;
22     TGtkAccelLabelClass = record
23          parent_class : TGtkLabelClass;
24          signal_quote1 : Pgchar;
25          signal_quote2 : Pgchar;
26          mod_name_shift : Pgchar;
27          mod_name_control : Pgchar;
28          mod_name_alt : Pgchar;
29          mod_separator : Pgchar;
30          accel_seperator : Pgchar;
31          flag0 : {$ifdef win32}longint{$else}word{$endif};
32       end;
33
34const
35  bm_TGtkAccelLabelClass_latin1_to_char = $1;
36  bp_TGtkAccelLabelClass_latin1_to_char = 0;
37
38type
39  GTK_ACCEL_LABEL=PGtkAccelLabel;
40  GTK_ACCEL_LABEL_CLASS=PGtkAccelLabelClass;
41
42
43function  latin1_to_char(var a : TGtkAccelLabelClass) : guint;
44procedure set_latin1_to_char(var a : TGtkAccelLabelClass; __latin1_to_char : guint);
45
46function  GTK_ACCEL_LABEL_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_accel_label_get_type';
47function  GTK_IS_ACCEL_LABEL(obj:pointer):boolean;
48function  GTK_IS_ACCEL_LABEL_CLASS(klass:pointer):boolean;
49
50function  gtk_accel_label_get_type:TGtkType;cdecl;external gtkdll name 'gtk_accel_label_get_type';
51function  gtk_accel_label_new(thestring:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_accel_label_new';
52function  gtk_accel_label_get_accel_width(accel_label:PGtkAccelLabel):guint;cdecl;external gtkdll name 'gtk_accel_label_get_accel_width';
53procedure gtk_accel_label_set_accel_widget(accel_label:PGtkAccelLabel; accel_widget:PGtkWidget);cdecl;external gtkdll name 'gtk_accel_label_set_accel_widget';
54function  gtk_accel_label_refetch(accel_label:PGtkAccelLabel):gboolean;cdecl;external gtkdll name 'gtk_accel_label_refetch';
55
56{$endif read_interface}
57
58
59{****************************************************************************
60                              Implementation
61****************************************************************************}
62
63{$ifdef read_implementation}
64
65function  latin1_to_char(var a : TGtkAccelLabelClass) : guint;
66    begin
67       latin1_to_char:=(a.flag0 and bm_TGtkAccelLabelClass_latin1_to_char) shr bp_TGtkAccelLabelClass_latin1_to_char;
68    end;
69
70procedure set_latin1_to_char(var a : TGtkAccelLabelClass; __latin1_to_char : guint);
71    begin
72       a.flag0:=a.flag0 or ((__latin1_to_char shl bp_TGtkAccelLabelClass_latin1_to_char) and bm_TGtkAccelLabelClass_latin1_to_char);
73    end;
74
75function  GTK_IS_ACCEL_LABEL(obj:pointer):boolean;
76begin
77  GTK_IS_ACCEL_LABEL:=(obj<>nil) and GTK_IS_ACCEL_LABEL_CLASS(PGtkTypeObject(obj)^.klass);
78end;
79
80function  GTK_IS_ACCEL_LABEL_CLASS(klass:pointer):boolean;
81begin
82  GTK_IS_ACCEL_LABEL_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ACCEL_LABEL_TYPE);
83end;
84
85{$endif read_implementation}
86
87