PageRenderTime 34ms CodeModel.GetById 11ms app.highlight 19ms RepoModel.GetById 1ms app.codeStats 1ms

/packages/gtk1/src/gtk/gtkbindings.pp

https://github.com/slibre/freepascal
Puppet | 128 lines | 104 code | 24 blank | 0 comment | 0 complexity | 01fc5696c295b9deb60c5da42b576f3d 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     PGtkPatternSpec = ^TGtkPatternSpec;
 12     TGtkPatternSpec = record
 13          match_type : TGtkMatchType;
 14          pattern_length : guint;
 15          pattern : Pgchar;
 16          pattern_reversed : Pgchar;
 17          user_data : gpointer;
 18          seq_id : guint;
 19       end;
 20
 21procedure gtk_pattern_spec_init(pspec:PGtkPatternSpec; pattern:Pgchar);cdecl;external gtkdll name 'gtk_pattern_spec_init';
 22procedure gtk_pattern_spec_free_segs(pspec:PGtkPatternSpec);cdecl;external gtkdll name 'gtk_pattern_spec_free_segs';
 23function  gtk_pattern_match(pspec:PGtkPatternSpec; string_length:guint; thestring:Pgchar; string_reversed:Pgchar):gboolean;cdecl;external gtkdll name 'gtk_pattern_match';
 24function  gtk_pattern_match_string(pspec:PGtkPatternSpec; thestring:Pgchar):gboolean;cdecl;external gtkdll name 'gtk_pattern_match_string';
 25function  gtk_pattern_match_simple(pattern:Pgchar; thestring:Pgchar):gboolean;cdecl;external gtkdll name 'gtk_pattern_match_simple';
 26
 27  type
 28     PGtkBindingSet = ^TGtkBindingSet;
 29     PGtkBindingEntry = ^TGtkBindingEntry;
 30     PGtkBindingSignal = ^TGtkBindingSignal;
 31     PGtkBindingArg = ^TGtkBindingArg;
 32
 33     TGtkBindingSet = record
 34          set_name : Pgchar;
 35          priority : gint;
 36          widget_path_pspecs : PGSList;
 37          widget_class_pspecs : PGSList;
 38          class_branch_pspecs : PGSList;
 39          entries : PGtkBindingEntry;
 40          current : PGtkBindingEntry;
 41       end;
 42
 43     TGtkBindingEntry = record
 44          keyval : guint;
 45          modifiers : guint;
 46          binding_set : PGtkBindingSet;
 47          flag0 : {$ifdef win32}longint{$else}word{$endif};
 48          set_next : PGtkBindingEntry;
 49          hash_next : PGtkBindingEntry;
 50          signals : PGtkBindingSignal;
 51       end;
 52
 53     TGtkBindingSignal = record
 54          next : PGtkBindingSignal;
 55          signal_name : Pgchar;
 56          n_args : guint;
 57          args : PGtkBindingArg;
 58       end;
 59
 60     TGtkBindingArg = record
 61          arg_type : TGtkType;
 62          d : record
 63              case longint of
 64                 0 : ( long_data : glong );
 65                 1 : ( double_data : gdouble );
 66                 2 : ( string_data : Pgchar );
 67              end;
 68       end;
 69
 70  const
 71     bm_TGtkBindingEntry_destroyed = $1;
 72     bp_TGtkBindingEntry_destroyed = 0;
 73     bm_TGtkBindingEntry_in_emission = $2;
 74     bp_TGtkBindingEntry_in_emission = 1;
 75function  destroyed(var a : TGtkBindingEntry) : guint;
 76procedure set_destroyed(var a : TGtkBindingEntry; __destroyed : guint);
 77function  in_emission(var a : TGtkBindingEntry) : guint;
 78procedure set_in_emission(var a : TGtkBindingEntry; __in_emission : guint);
 79
 80
 81function  gtk_binding_set_new(set_name:Pgchar):PGtkBindingSet;cdecl;external gtkdll name 'gtk_binding_set_new';
 82function  gtk_binding_set_by_class(object_class:gpointer):PGtkBindingSet;cdecl;external gtkdll name 'gtk_binding_set_by_class';
 83function  gtk_binding_set_find(set_name:Pgchar):PGtkBindingSet;cdecl;external gtkdll name 'gtk_binding_set_find';
 84function  gtk_bindings_activate(theobject:PGtkObject; keyval:guint; modifiers:guint):gboolean;cdecl;external gtkdll name 'gtk_bindings_activate';
 85function  gtk_binding_set_activate(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint; theobject:PGtkObject):gboolean;cdecl;external gtkdll name 'gtk_binding_set_activate';
 86procedure gtk_binding_entry_add(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint);cdecl;external gtkdll name 'gtk_binding_entry_clear';
 87procedure gtk_binding_entry_clear(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint);cdecl;external gtkdll name 'gtk_binding_entry_clear';
 88procedure gtk_binding_entry_add_signal(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint; signal_name:Pgchar; n_args:guint; args:array of const);cdecl;external gtkdll name 'gtk_binding_entry_add_signal';
 89procedure gtk_binding_set_add_path(binding_set:PGtkBindingSet; path_type:TGtkPathType; path_pattern:Pgchar; priority:TGtkPathPriorityType);cdecl;external gtkdll name 'gtk_binding_set_add_path';
 90{$ifndef gtkwin}
 91procedure gtk_binding_entry_remove(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint);cdecl;external gtkdll name 'gtk_binding_entry_remove';
 92procedure gtk_binding_entry_add_signall(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint; signal_name:Pgchar; binding_args:PGSList);cdecl;external gtkdll name 'gtk_binding_entry_add_signall';
 93function  gtk_binding_parse_binding(scanner:PGScanner):guint;cdecl;external gtkdll name 'gtk_binding_parse_binding';
 94{$endif}
 95
 96{$endif read_interface}
 97
 98
 99{****************************************************************************
100                              Implementation
101****************************************************************************}
102
103{$ifdef read_implementation}
104
105
106function  destroyed(var a : TGtkBindingEntry) : guint;
107    begin
108       destroyed:=(a.flag0 and bm_TGtkBindingEntry_destroyed) shr bp_TGtkBindingEntry_destroyed;
109    end;
110
111procedure set_destroyed(var a : TGtkBindingEntry; __destroyed : guint);
112    begin
113       a.flag0:=a.flag0 or ((__destroyed shl bp_TGtkBindingEntry_destroyed) and bm_TGtkBindingEntry_destroyed);
114    end;
115
116function  in_emission(var a : TGtkBindingEntry) : guint;
117    begin
118       in_emission:=(a.flag0 and bm_TGtkBindingEntry_in_emission) shr bp_TGtkBindingEntry_in_emission;
119    end;
120
121procedure set_in_emission(var a : TGtkBindingEntry; __in_emission : guint);
122    begin
123       a.flag0:=a.flag0 or ((__in_emission shl bp_TGtkBindingEntry_in_emission) and bm_TGtkBindingEntry_in_emission);
124    end;
125
126{$endif read_implementation}
127
128