Skip to content
This repository
Browse code

Add modal argument to hl_gtk_window_new.

  • Loading branch information...
commit 0ffd064bea65e265b99929350f5503822e294081 1 parent ac29b4a
James Tappin authored February 15, 2013
12  src/gtk-hl-container-tmpl.f90
@@ -82,7 +82,7 @@ module gtk_hl_container
82 82
        & gtk_window_set_keep_below, gtk_window_set_resizable,&
83 83
        & gtk_window_set_title, gtk_window_set_transient_for, &
84 84
        & gtk_window_set_icon_name, gtk_window_set_icon_from_file, &
85  
-       & gtk_window_set_icon, &
  85
+       & gtk_window_set_icon, gtk_window_set_modal, &
86 86
 !!$GTK< 3.0!       & gtk_notebook_set_group, &
87 87
 !!$GTK>=3.0!       & gtk_notebook_set_group_name, &
88 88
        & gtk_scrolled_window_new, gtk_scrolled_window_set_policy, &
@@ -100,7 +100,7 @@ module gtk_hl_container
100 100
   function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
101 101
        & data_delete_event, border, wsize, sensitive, resizable, decorated, &
102 102
        & deletable, above, below, parent, accel_group, icon, icon_file,&
103  
-       & icon_name) result(win)
  103
+       & icon_name, modal) result(win)
104 104
 
105 105
     type(c_ptr) :: win
106 106
     character(kind=c_char), dimension(*), intent(in), optional :: title
@@ -115,6 +115,7 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
115 115
     type(c_ptr), intent(in), optional :: icon
116 116
     character(kind=c_char), dimension(*), intent(in), optional :: icon_name, &
117 117
          & icon_file
  118
+    integer(kind=c_int), intent(in), optional :: modal
118 119
 
119 120
     ! Higher-level interface to make a gtk_window
120 121
     !
@@ -144,6 +145,8 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
144 145
     ! 		the window.
145 146
     ! ICON_NAME: String : optional : The name of a standard icon to use for
146 147
     ! 		the window.
  148
+    ! MODAL: boolean: optional: Set to true to make the window modal (only
  149
+    ! 		meaningful if PARENT is also set).
147 150
     !
148 151
     ! Only one way of setting the icon should be given, if more than one
149 152
     ! is specified the priority is ICON, ICON_FILE, ICON_NAME.
@@ -190,7 +193,10 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
190 193
     if (present(below)) &
191 194
          & call gtk_window_set_keep_below(win, below)
192 195
 
193  
-    if (present(parent)) call gtk_window_set_transient_for(win, parent)
  196
+    if (present(parent)) then
  197
+       call gtk_window_set_transient_for(win, parent)
  198
+       if (present(modal)) call gtk_window_set_modal(win, modal)
  199
+    end if
194 200
 
195 201
     if (present(icon)) then
196 202
        call gtk_window_set_icon(win, icon)
14  src/gtk-hl-container.f90
@@ -26,7 +26,7 @@
26 26
 
27 27
 ! --------------------------------------------------------
28 28
 ! gtk-hl-container.f90
29  
-! Generated: Fri Feb  1 15:23:23 2013 GMT
  29
+! Generated: Fri Feb 15 18:41:03 2013 GMT
30 30
 ! Please do not edit this file directly,
31 31
 ! Edit gtk-hl-container-tmpl.f90, and use ./mk_gtk_hl.pl to regenerate.
32 32
 ! Generated for GTK+ version: 2.24.0.
@@ -81,7 +81,7 @@ module gtk_hl_container
81 81
        & gtk_window_set_keep_below, gtk_window_set_resizable,&
82 82
        & gtk_window_set_title, gtk_window_set_transient_for, &
83 83
        & gtk_window_set_icon_name, gtk_window_set_icon_from_file, &
84  
-       & gtk_window_set_icon, &
  84
+       & gtk_window_set_icon, gtk_window_set_modal, &
85 85
        & gtk_notebook_set_group, &
86 86
 !!$GTK>=3.0!       & gtk_notebook_set_group_name, &
87 87
        & gtk_scrolled_window_new, gtk_scrolled_window_set_policy, &
@@ -99,7 +99,7 @@ module gtk_hl_container
99 99
   function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
100 100
        & data_delete_event, border, wsize, sensitive, resizable, decorated, &
101 101
        & deletable, above, below, parent, accel_group, icon, icon_file,&
102  
-       & icon_name) result(win)
  102
+       & icon_name, modal) result(win)
103 103
 
104 104
     type(c_ptr) :: win
105 105
     character(kind=c_char), dimension(*), intent(in), optional :: title
@@ -114,6 +114,7 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
114 114
     type(c_ptr), intent(in), optional :: icon
115 115
     character(kind=c_char), dimension(*), intent(in), optional :: icon_name, &
116 116
          & icon_file
  117
+    integer(kind=c_int), intent(in), optional :: modal
117 118
 
118 119
     ! Higher-level interface to make a gtk_window
119 120
     !
@@ -143,6 +144,8 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
143 144
     ! 		the window.
144 145
     ! ICON_NAME: String : optional : The name of a standard icon to use for
145 146
     ! 		the window.
  147
+    ! MODAL: boolean: optional: Set to true to make the window modal (only
  148
+    ! 		meaningful if PARENT is also set).
146 149
     !
147 150
     ! Only one way of setting the icon should be given, if more than one
148 151
     ! is specified the priority is ICON, ICON_FILE, ICON_NAME.
@@ -189,7 +192,10 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
189 192
     if (present(below)) &
190 193
          & call gtk_window_set_keep_below(win, below)
191 194
 
192  
-    if (present(parent)) call gtk_window_set_transient_for(win, parent)
  195
+    if (present(parent)) then
  196
+       call gtk_window_set_transient_for(win, parent)
  197
+       if (present(modal)) call gtk_window_set_modal(win, modal)
  198
+    end if
193 199
 
194 200
     if (present(icon)) then
195 201
        call gtk_window_set_icon(win, icon)

0 notes on commit 0ffd064

Please sign in to comment.
Something went wrong with that request. Please try again.