Permalink
Browse files

Add modal argument to hl_gtk_window_new.

  • Loading branch information...
1 parent ac29b4a commit 0ffd064bea65e265b99929350f5503822e294081 @jtappin jtappin committed Feb 15, 2013
Showing with 19 additions and 7 deletions.
  1. +9 −3 src/gtk-hl-container-tmpl.f90
  2. +10 −4 src/gtk-hl-container.f90
View
12 src/gtk-hl-container-tmpl.f90
@@ -82,7 +82,7 @@ module gtk_hl_container
& gtk_window_set_keep_below, gtk_window_set_resizable,&
& gtk_window_set_title, gtk_window_set_transient_for, &
& gtk_window_set_icon_name, gtk_window_set_icon_from_file, &
- & gtk_window_set_icon, &
+ & gtk_window_set_icon, gtk_window_set_modal, &
!!$GTK< 3.0! & gtk_notebook_set_group, &
!!$GTK>=3.0! & gtk_notebook_set_group_name, &
& gtk_scrolled_window_new, gtk_scrolled_window_set_policy, &
@@ -100,7 +100,7 @@ module gtk_hl_container
function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
& data_delete_event, border, wsize, sensitive, resizable, decorated, &
& deletable, above, below, parent, accel_group, icon, icon_file,&
- & icon_name) result(win)
+ & icon_name, modal) result(win)
type(c_ptr) :: win
character(kind=c_char), dimension(*), intent(in), optional :: title
@@ -115,6 +115,7 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
type(c_ptr), intent(in), optional :: icon
character(kind=c_char), dimension(*), intent(in), optional :: icon_name, &
& icon_file
+ integer(kind=c_int), intent(in), optional :: modal
! Higher-level interface to make a gtk_window
!
@@ -144,6 +145,8 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
! the window.
! ICON_NAME: String : optional : The name of a standard icon to use for
! the window.
+ ! MODAL: boolean: optional: Set to true to make the window modal (only
+ ! meaningful if PARENT is also set).
!
! Only one way of setting the icon should be given, if more than one
! 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, &
if (present(below)) &
& call gtk_window_set_keep_below(win, below)
- if (present(parent)) call gtk_window_set_transient_for(win, parent)
+ if (present(parent)) then
+ call gtk_window_set_transient_for(win, parent)
+ if (present(modal)) call gtk_window_set_modal(win, modal)
+ end if
if (present(icon)) then
call gtk_window_set_icon(win, icon)
View
14 src/gtk-hl-container.f90
@@ -26,7 +26,7 @@
! --------------------------------------------------------
! gtk-hl-container.f90
-! Generated: Fri Feb 1 15:23:23 2013 GMT
+! Generated: Fri Feb 15 18:41:03 2013 GMT
! Please do not edit this file directly,
! Edit gtk-hl-container-tmpl.f90, and use ./mk_gtk_hl.pl to regenerate.
! Generated for GTK+ version: 2.24.0.
@@ -81,7 +81,7 @@ module gtk_hl_container
& gtk_window_set_keep_below, gtk_window_set_resizable,&
& gtk_window_set_title, gtk_window_set_transient_for, &
& gtk_window_set_icon_name, gtk_window_set_icon_from_file, &
- & gtk_window_set_icon, &
+ & gtk_window_set_icon, gtk_window_set_modal, &
& gtk_notebook_set_group, &
!!$GTK>=3.0! & gtk_notebook_set_group_name, &
& gtk_scrolled_window_new, gtk_scrolled_window_set_policy, &
@@ -99,7 +99,7 @@ module gtk_hl_container
function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
& data_delete_event, border, wsize, sensitive, resizable, decorated, &
& deletable, above, below, parent, accel_group, icon, icon_file,&
- & icon_name) result(win)
+ & icon_name, modal) result(win)
type(c_ptr) :: win
character(kind=c_char), dimension(*), intent(in), optional :: title
@@ -114,6 +114,7 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
type(c_ptr), intent(in), optional :: icon
character(kind=c_char), dimension(*), intent(in), optional :: icon_name, &
& icon_file
+ integer(kind=c_int), intent(in), optional :: modal
! Higher-level interface to make a gtk_window
!
@@ -143,6 +144,8 @@ function hl_gtk_window_new(title, destroy, delete_event, data_destroy, &
! the window.
! ICON_NAME: String : optional : The name of a standard icon to use for
! the window.
+ ! MODAL: boolean: optional: Set to true to make the window modal (only
+ ! meaningful if PARENT is also set).
!
! Only one way of setting the icon should be given, if more than one
! 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, &
if (present(below)) &
& call gtk_window_set_keep_below(win, below)
- if (present(parent)) call gtk_window_set_transient_for(win, parent)
+ if (present(parent)) then
+ call gtk_window_set_transient_for(win, parent)
+ if (present(modal)) call gtk_window_set_modal(win, modal)
+ end if
if (present(icon)) then
call gtk_window_set_icon(win, icon)

0 comments on commit 0ffd064

Please sign in to comment.