PyGTK API additions



We passed the API freeze already, but I'd like to get the permissions to add the attached patch which does the following:

Adds support for virtual methods (all which had pointers as return values),
that were not generated. It's about 30 of them.

This won't break applications, not change the API, it'll only add missing
wrappers for existing functionality already present in the gtk+ library we already wrap.

If you think it's too many of them and/or the change is to big, please consider only approving the virtual methods for GtkAction and GtkCellRenderer, which are really useful, without them it won't be possible to completely implement custom actions/cellrenderers in python.

Pretty please, can I add this?

--
Johan Dahlin <jdahlin async com br>
Async Open Source


Index: gtk/gtk.defs
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/gtk/gtk.defs,v
retrieving revision 1.219
diff -u -d -r1.219 gtk.defs
--- gtk/gtk.defs	17 Jul 2005 19:11:27 -0000	1.219
+++ gtk/gtk.defs	4 Aug 2005 17:49:32 -0000
@@ -360,10 +360,10 @@
   (of-object "GtkAccelGroup")
   (c-name "gtk_accel_group_find")
   (return-type "GtkAccelKey*")
-   (parameters
+  (parameters
     '("gboolean" "(*find_func")
-   )
- )
+  )
+)
 
 (define-function accel_group_from_accel_closure
   (c-name "gtk_accel_group_from_accel_closure")
@@ -836,6 +836,14 @@
   (of-object "GtkAction")
   (return-type "none")
 )
+(define-virtual create_menu_item
+  (of-object "GtkAction")
+  (return-type "GtkWidget*")
+)
+(define-virtual create_tool_item
+  (of-object "GtkAction")
+  (return-type "GtkWidget*")
+)
 (define-virtual connect_proxy
   (of-object "GtkAction")
   (return-type "none")
@@ -1048,6 +1056,13 @@
   )
 )
 
+(define-virtual get_action
+  (of-object "GtkActionGroup")
+  (return-type "GtkAction*")
+  (parameters
+    '("const-gchar*" "action_name")
+  )
+)
 
 ;; From /opt/gtk2/include/gtk-2.0/gtk/gtkadjustment.h
 
@@ -2277,6 +2292,18 @@
     '("GtkCellRendererState" "flags")
   )
 )
+(define-virtual start_editing
+  (of-object "GtkCellRenderer")
+  (return-type "GtkCellEditable*")
+  (parameters
+    '("GdkEvent*" "event")
+    '("GtkWidget*" "widget")
+    '("const-gchar*" "path")
+    '("GdkRectangle*" "background_area")
+    '("GdkRectangle*" "cell_area")
+    '("GtkCellRendererState" "flags")
+  )
+)
 (define-virtual editing_canceled
   (of-object "GtkCellRenderer")
   (return-type "none")
@@ -4117,6 +4144,11 @@
   (return-type "none")
 )
 
+(define-virtual get_active_text
+  (of-object "GtkComboBox")
+  (return-type "gchar*")
+)
+
 ;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcomboboxentry.h
 
 (define-function gtk_combo_box_entry_get_type
@@ -4505,6 +4537,13 @@
   (of-object "GtkContainer")
   (return-type "GType")
 )
+(define-virtual composite_name
+  (of-object "GtkContainer")
+  (return-type "gchar*")
+  (parameters
+    '("GtkWidget*" "child")
+  )
+)
 (define-virtual set_child_property
   (of-object "GtkContainer")
   (return-type "none")
@@ -5878,6 +5917,14 @@
     '("gint" "end_pos")
   )
 )
+(define-virtual get_chars
+  (of-object "GtkEditable")
+  (return-type "gchar*")
+  (parameters
+    '("gint" "start_pos")
+    '("gint" "end_pos")
+  )
+)
 (define-virtual set_selection_bounds
   (of-object "GtkEditable")
   (return-type "none")
@@ -7553,6 +7600,26 @@
   (return-type "GSList*")
 )
 
+(define-virtual list_volumes
+  (of-object "GtkFileSystem")
+  (return-type "GSList*")
+)
+(define-virtual get_volume_for_path
+  (of-object "GtkFileSystem")
+  (return-type "GtkFileSystemVolume*")
+  (parameters
+    '("const-GtkFilePath*" "path")
+  )
+)
+(define-virtual get_folder
+  (of-object "GtkFileSystem")
+  (return-type "GtkFileFolder*")
+  (parameters
+    '("const-GtkFilePath*" "path")
+    '("GtkFileInfoType" "types")
+    '("GError**" "error")
+  )
+)
 (define-virtual create_folder
   (of-object "GtkFileSystem")
   (return-type "gboolean")
@@ -7568,6 +7635,13 @@
     '("GtkFileSystemVolume*" "volume")
   )
 )
+(define-virtual volume_get_base_path
+  (of-object "GtkFileSystem")
+  (return-type "GtkFilePath*")
+  (parameters
+    '("GtkFileSystemVolume*" "volume")
+  )
+)
 (define-virtual volume_get_is_mounted
   (of-object "GtkFileSystem")
   (return-type "gboolean")
@@ -7583,6 +7657,23 @@
     '("GError**" "error")
   )
 )
+(define-virtual volume_get_display_name
+  (of-object "GtkFileSystem")
+  (return-type "char*")
+  (parameters
+    '("GtkFileSystemVolume*" "volume")
+  )
+)
+(define-virtual volume_render_icon
+  (of-object "GtkFileSystem")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("GtkFileSystemVolume*" "volume")
+    '("GtkWidget*" "widget")
+    '("gint" "pixel_size")
+    '("GError**" "error")
+  )
+)
 (define-virtual get_parent
   (of-object "GtkFileSystem")
   (return-type "gboolean")
@@ -7592,6 +7683,15 @@
     '("GError**" "error")
   )
 )
+(define-virtual make_path
+  (of-object "GtkFileSystem")
+  (return-type "GtkFilePath*")
+  (parameters
+    '("const-GtkFilePath*" "base_path")
+    '("const-gchar*" "display_name")
+    '("GError**" "error")
+  )
+)
 (define-virtual parse
   (of-object "GtkFileSystem")
   (return-type "gboolean")
@@ -7620,6 +7720,10 @@
     '("GError**" "error")
   )
 )
+(define-virtual list_bookmarks
+  (of-object "GtkFileSystem")
+  (return-type "GSList*")
+)
 (define-virtual volumes_changed
   (of-object "GtkFileSystem")
   (return-type "none")
@@ -7628,6 +7732,51 @@
   (of-object "GtkFileSystem")
   (return-type "none")
 )
+(define-virtual get_bookmark_label
+  (of-object "GtkFileSystem")
+  (return-type "gchar*")
+  (parameters
+    '("const-GtkFilePath*" "path")
+  )
+)
+(define-virtual path_to_uri
+  (of-object "GtkFileSystem")
+  (return-type "gchar*")
+  (parameters
+    '("const-GtkFilePath*" "path")
+  )
+)
+(define-virtual path_to_filename
+  (of-object "GtkFileSystem")
+  (return-type "gchar*")
+  (parameters
+    '("const-GtkFilePath*" "path")
+  )
+)
+(define-virtual uri_to_path
+  (of-object "GtkFileSystem")
+  (return-type "GtkFilePath*")
+  (parameters
+    '("const-gchar*" "uri")
+  )
+)
+(define-virtual filename_to_path
+  (of-object "GtkFileSystem")
+  (return-type "GtkFilePath*")
+  (parameters
+    '("const-gchar*" "path")
+  )
+)
+(define-virtual render_icon
+  (of-object "GtkFileSystem")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-GtkFilePath*" "path")
+    '("GtkWidget*" "widget")
+    '("gint" "pixel_size")
+    '("GError**" "error")
+  )
+)
 
 
 (define-function gtk_file_folder_get_type
@@ -7679,6 +7828,14 @@
   )
 )
 
+(define-virtual get_info
+  (of-object "GtkFileFolder")
+  (return-type "GtkFileInfo*")
+  (parameters
+    '("const-GtkFilePath*" "path")
+    '("GError**" "error")
+  )
+)
 (define-virtual list_children
   (of-object "GtkFileFolder")
   (return-type "gboolean")
@@ -12881,7 +13038,6 @@
 )
 
 
-
 ;; From /opt/gtk2/include/gtk-2.0/gtk/gtkoptionmenu.h
 
 (define-function gtk_option_menu_get_type
@@ -14388,6 +14544,13 @@
   )
 )
 
+(define-virtual format_value
+  (of-object "GtkScale")
+  (return-type "gchar*")
+  (parameters
+    '("gdouble" "value")
+  )
+)
 (define-virtual draw_value
   (of-object "GtkScale")
   (return-type "none")
@@ -16356,6 +16519,10 @@
     '("GtkStyle*" "src")
   )
 )
+(define-virtual clone
+  (of-object "GtkStyle")
+  (return-type "GtkStyle*")
+)
 (define-virtual init_from_rc
   (of-object "GtkStyle")
   (return-type "none")
@@ -16371,6 +16538,18 @@
     '("GtkStateType" "state_type")
   )
 )
+(define-virtual render_icon
+  (of-object "GtkStyle")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-GtkIconSource*" "source")
+    '("GtkTextDirection" "direction")
+    '("GtkStateType" "state")
+    '("GtkIconSize" "size")
+    '("GtkWidget*" "widget")
+    '("const-gchar*" "detail")
+  )
+)
 (define-virtual draw_hline
   (of-object "GtkStyle")
   (return-type "none")
@@ -22845,6 +23024,20 @@
     '("GtkAction*" "action")
   )
 )
+(define-virtual get_widget
+  (of-object "GtkUIManager")
+  (return-type "GtkWidget*")
+  (parameters
+    '("const-gchar*" "path")
+  )
+)
+(define-virtual get_action
+  (of-object "GtkUIManager")
+  (return-type "GtkAction*")
+  (parameters
+    '("const-gchar*" "path")
+  )
+)
 
 
 ;; From /opt/gtk2/include/gtk-2.0/gtk/gtkvbbox.h
@@ -24520,6 +24713,10 @@
   (parameters
     '("GtkWidgetHelpType" "help_type")
   )
+)
+(define-virtual get_accessible
+  (of-object "GtkWidget")
+  (return-type "AtkObject*")
 )
 (define-virtual screen_changed
   (of-object "GtkWidget")
begin:vcard
fn:Johan Dahlin
n:Dahlin;Johan
org:Async Open Source;Development
adr;quoted-printable:Jardim Macarengo;;Rua Orlando Damiano, 2212;S=C3=A3o Carlos;SP;13560-450;Brazil
email;internet:jdahlin async com br
title:Software developer
tel;work:+55 16 3376 0125
tel;fax:+55 16 3501 5394
tel;home:+55 16 3501 5332
tel;cell:+55 16 9112 6219
x-mozilla-html:FALSE
url:http://www.async.com.br
version:2.1
end:vcard



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]