PyWebKitGtk 1.0.2 release
[pywebkitgtk.git] / webkit.defs
blob849ea6287547657cf58f5d8b1aa5971467b819cc
1 ;; -*- scheme -*-
2 ;; PyWebKitGtk - Python bindings to WebKit/GTK+
3 ;;
4 ;; Copyright (C) 2007-2008  Jan Michael Alonzo <jmalonzo@unpluggable.com>
5 ;; 
6 ;; This library is free software; you can redistribute it and/or
7 ;; modify it under the terms of the GNU Library General Public
8 ;; License as published by the Free Software Foundation; either
9 ;; version 2 of the License, or (at your option) any later version.
10 ;; 
11 ;; This library is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 ;; Library General Public License for more details.
15 ;; 
16 ;; You should have received a copy of the GNU Library General Public
17 ;; License along with this library; if not, write to the Free Software
18 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 USA
22 ; object definitions ...
23 (define-object WebView
24   (in-module "WebKit")
25   (parent "GtkContainer")
26   (c-name "WebKitWebView")
27   (gtype-id "WEBKIT_TYPE_WEB_VIEW")
30 (define-object WebFrame
31   (in-module "WebKit")
32   (parent "GObject")
33   (c-name "WebKitWebFrame")
34   (gtype-id "WEBKIT_TYPE_WEB_FRAME")
37 (define-object WebHistoryItem
38   (in-module "WebKit")
39   (parent "GObject")
40   (c-name "WebKitWebHistoryItem")
41   (gtype-id "WEBKIT_TYPE_WEB_HISTORY_ITEM")
44 (define-object WebBackForwardList
45   (in-module "WebKit")
46   (parent "GObject")
47   (c-name "WebKitWebBackForwardList")
48   (gtype-id "WEBKIT_TYPE_WEB_BACK_FORWARD_LIST")
51 (define-object WebSettings
52   (in-module "WebKit")
53   (parent "GObject")
54   (c-name "WebKitWebSettings")
55   (gtype-id "WEBKIT_TYPE_WEB_SETTINGS")
58 (define-object NetworkRequest
59   (in-module "WebKit")
60   (parent "GObject")
61   (c-name "WebKitNetworkRequest")
62   (gtype-id "WEBKIT_TYPE_NETWORK_REQUEST")
65 ;; Enumerations and flags ...
66 (enum NavigationResponse
67   (in-module "WebKit")
68   (c-name "WebKitNavigationResponse")
69   (gtype-id "WEBKIT_TYPE_NAVIGATION_RESPONSE")
70   (values
71    '("accept" "WEBKIT_NAVIGATION_RESPONSE_ACCEPT")
72    '("ignore" "WEBKIT_NAVIGATION_RESPONSE_IGNORE")
73    '("download" "WEBKIT_NAVIGATION_RESPONSE_DOWNLOAD")
74    )
77 (enum WebViewTargetInfo
78   (in-module "WebKit")
79   (c-name "WebKitWebViewTargetInfo")
80   (gtype-id "WEBKIT_TYPE_WEB_VIEW_TARGET_INFO")
81   (values
82    '("html" "WEBKIT_WEB_VIEW_TARGET_INFO_HTML")
83    '("text" "WEBKIT_WEB_VIEW_TARGET_INFO_TEXT")
84    )
87 ;; From <webkit/webkitwebview.h>
89 (define-function webkit_web_view_new
90   (is-constructor-of "WebKitWebView")
91   (c-name "webkit_web_view_new")
92   (caller-owns-return #t)
93   (return-type "GtkWidget*")
96 (define-method set_maintains_back_forward_list
97   (of-object "WebKitWebView")
98   (c-name "webkit_web_view_set_maintains_back_forward_list")
99   (parameters
100    '("gboolean" "flag")
101    )
104 (define-method get_back_forward_list
105   (of-object "WebKitWebView")
106   (c-name "webkit_web_view_get_back_forward_list")
107   (return-type "WebKitWebBackForwardList*")
110 (define-method go_to_back_forward_item
111   (of-object "WebKitWebView")
112   (c-name "webkit_web_view_go_to_back_forward_item")
113   (return-type "gboolean")
114   (parameters
115    '("WebKitWebHistoryItem*" "item")
116    )
119 (define-method can_go_back
120   (of-object "WebKitWebView")
121   (c-name "webkit_web_view_can_go_back")
122   (return-type "gboolean")
125 (define-method can_go_forward
126   (of-object "WebKitWebView")
127   (c-name "webkit_web_view_can_go_forward")
128   (return-type "gboolean")
131 (define-method go_back
132   (of-object "WebKitWebView")
133   (c-name "webkit_web_view_go_back")
134   (return-type "none")
137 (define-method go_forward
138   (of-object "WebKitWebView")
139   (c-name "webkit_web_view_go_forward")
140   (return-type "none")
143 (define-method go_back_or_forward
144   (of-object "WebKitWebView")
145   (c-name "webkit_web_view_go_back_or_forward")
146   (return-type "none")
147   (parameters
148    '("gint" "steps")
149    )
152 (define-method stop_loading
153   (of-object "WebKitWebView")
154   (c-name "webkit_web_view_stop_loading")
155   (return-type "none")
158 (define-method open
159   (of-object "WebKitWebView")
160   (c-name "webkit_web_view_open")
161   (return-type "none")
162   (parameters
163    '("const-gchar*" "uri")
164   )
167 (define-method reload
168   (of-object "WebKitWebView")
169   (c-name "webkit_web_view_reload")
170   (return-type "none")
173 (define-method load_html_string
174   (of-object "WebKitWebView")
175   (c-name "webkit_web_view_load_html_string")
176   (return-type "none")
177   (parameters
178    '("const-gchar*" "content")
179    '("const-gchar*" "base_uri")
180    )
183 (define-method load_string
184   (of-object "WebKitWebView")
185   (c-name "webkit_web_view_load_string")
186   (return-type "none")
187   (parameters
188    '("const-gchar*" "content")
189    '("const-gchar*" "content_mimetype")
190    '("const-gchar*" "content_encoding")
191    '("const-gchar*" "base_uri")
192    )
195 (define-method get_main_frame
196   (of-object "WebKitWebView")
197   (c-name "webkit_web_view_get_main_frame")
198   (return-type "WebKitWebFrame*")
201 (define-method get_focused_frame
202   (of-object "WebKitWebView")
203   (c-name "webkit_web_view_get_focused_frame")
204   (return-type "WebKitWebFrame*")
207 (define-method execute_script
208   (of-object "WebKitWebView")
209   (c-name "webkit_web_view_execute_script")
210   (return-type "none")
211   (parameters
212    '("const-gchar*" "script")
213    )
216 (define-method get_editable
217   (of-object "WebKitWebView")
218   (c-name "webkit_web_view_get_editable")
219   (return-type "gboolean")
222 (define-method set_editable
223   (of-object "WebKitWebView")
224   (c-name "webkit_web_view_set_editable")
225   (return-type "none")
226   (parameters
227    '("gboolean" "flag")
228    )
231 (define-method search_text
232   (of-object "WebKitWebView")
233   (c-name "webkit_web_view_search_text")
234   (return-type "gboolean")
235   (parameters
236    ("const-gchar*" "string")
237    ("gboolean" "case_sensitive")
238    ("gboolean" "forward")
239    ("gboolean" "wrap")
240    )
243 (define-method mark_text_matches
244   (of-object "WebKitWebView")
245   (c-name "webkit_web_view_mark_text_matches")
246   (return-type "guint")
247   (parameters
248    ("const-gchar*" "string")
249    ("gboolean" "case_sensitive")
250    ("guint" "limit")
251    )
254 (define-method set_highlight_text_matches
255   (of-object "WebKitWebView")
256   (c-name "webkit_web_view_set_highlight_text_matches")
257   (return-type "none")
258   (parameters
259    ("gboolean" "highlight")
260    )
263 (define-method can_cut_clipboard
264   (of-object "WebKitWebView")
265   (c-name "webkit_web_view_can_cut_clipboard")
266   (return-type "none")
269 (define-method can_copy_clipboard
270   (of-object "WebKitWebView")
271   (c-name "webkit_web_view_can_copy_clipboard")
272   (return-type "none")
275 (define-method can_paste_clipboard
276   (of-object "WebKitWebView")
277   (c-name "webkit_web_view_can_paste_clipboard")
278   (return-type "none")
281 (define-method cut_clipboard
282   (of-object "WebkitWebView")
283   (c-name "webkit_web_view_cut_clipboard")
284   (return-type "none")
287 (define-method paste_clipboard
288   (of-object "WebKitWebView")
289   (c-name "webkit_web_view_paste_clipboard")
290   (return-type "none")
293 (define-method delete_selection
294   (of-object "WebKitWebView")
295   (c-name "webkit_web_view_delete_selection")
296   (return-type "none")
299 (define-method has_selection
300   (of-object "WebKitWebView")
301   (c-name "webkit_web_view_has_selection")
302   (return-type "gboolean")
305 (define-method select_all
306   (of-object "WebKitWebView")
307   (c-name "webkit_web_view_select_all")
308   (return-type "none")
311 (define-method get_copy_target_list
312   (of-object "WebKitWebView")
313   (c-name "webkit_web_view_get_copy_target_list")
314   (return-type "GtkTargetList*")
317 (define-method get_paste_target_list
318   (of-object "WebKitWebView")
319   (c-name "webkit_web_view_get_paste_target_list")
320   (return-type "GtkTargetList*")
323 (define-method set_settings
324   (of-object "WebKitWebView")
325   (c-name "webkit_web_view_set_settings")
326   (return-type "none")
327   (parameters
328    '("WebKitWebSettings" "settings")
329    )
332 (define-method get_settings
333   (of-object "WebKitWebView")
334   (c-name "webkit_web_view_get_settings")
335   (return-type "WebKitWebSettings*")
338 (define-method get_transparent
339   (of-object "WebKitWebView")
340   (c-name "webkit_web_view_get_transparent")
341   (return-type "gboolean")
344 (define-method set_transparent
345   (of-object "WebKitWebView")
346   (c-name "webkit_web_view_set_transparent")
347   (return-type "none")
348   (parameters
349    '("gboolean" "flag")
350    )
353 (define-method get_zoom_level
354   (of-object "WebKitWebView")
355   (c-name "webkit_web_view_get_zoom_level")
356   (return-type "gfloat")
359 (define-method set_zoom_level
360   (of-object "WebKitWebView")
361   (c-name "webkit_web_view_set_zoom_level")
362   (return-type "none")
363   (parameters
364    '("gfloat" "zoom_level")
365    )
368 (define-method zoom_in
369   (of-object "WebKitWebView")
370   (c-name "webkit_web_view_zoom_in")
371   (return-type "none")
374 (define-method zoom_out
375   (of-object "WebKitWebView")
376   (c-name "webkit_web_view_zoom_out")
377   (return-type "none")
380 (define-method get_full_content_zoom
381   (of-object "WebKitWebView")
382   (c-name "webkit_web_view_get_full_content_zoom")
383   (return-type "gboolean")
386 (define-method set_full_content_zoom
387   (of-object "WebKitWebView")
388   (c-name "webkit_web_view_set_full_content_zoom")
389   (return-type "none")
390   (parameters
391    '("gboolean" "full_content_zoom")
392    )
395 ;(define-method set_background_color
396 ;  (of-object "WebKitWebView")
397 ;  (c-name "webkit_web_view_set_background_color")
398 ;  (return-type "none")
399 ;  (parameters
400 ;   '("const-GdkColor*" "color")
401 ;   )
404 ;(define-method get_background_alpha
405 ;  (of-object "WebKitWebView")
406 ;  (c-name "webkit_web_view_get_background_alpha")
407 ;  (return-type "guint16")
410 ;(define-method set_background_alpha
411 ;  (of-object "WebKitWebView")
412 ;  (c-name "webkit_web_view_set_background_alpha")
413 ;  (return-type "none")
414 ;  (parameters
415 ;   '("guint16" "alpha")
416 ;   )
419 ;; From <webkit/webkitwebframe.h>
421 (define-function webkit_web_frame_new
422   (is-constructor-of "WebKitWebFrame")
423   (c-name "webkit_web_frame_new")
424   (caller-owns-return #t)
425   (return-type "WebKitWebFrame*")
426   (properties
427    '("web_view" (argname "web_view"))
428    )
431 (define-method get_web_view
432   (of-object "WebKitWebFrame")
433   (c-name "webkit_web_frame_get_web_view")
434   (return-type "WebKitWebView*")
437 (define-method get_name
438   (of-object "WebKitWebFrame")
439   (c-name "webkit_web_frame_get_name")
440   (return-type "const-gchar*")
443 (define-method get_title
444   (of-object "WebKitWebFrame")
445   (c-name "webkit_web_frame_get_title")
446   (return-type "const-gchar*")
449 (define-method get_uri
450   (of-object "WebKitWebFrame")
451   (c-name "webkit_web_frame_get_uri")
452   (return-type "const-gchar*")
455 (define-method get_parent
456   (of-object "WebKitWebFrame")
457   (c-name "webkit_web_frame_get_parent")
458   (return-type "WebKitWebFrame*")
461 (define-method load_request
462   (of-object "WebKitWebFrame")
463   (c-name "webkit_web_frame_load_request")
464   (return-type "none")
465   (parameters
466    '("WebKitNetworkRequest*" "request")
467    )
470 (define-method stop_loading
471   (of-object "WebKitWebFrame")
472   (c-name "webkit_web_frame_stop_loading")
473   (return-type "none")
476 (define-method reload
477   (of-object "WebKitWebFrame")
478   (c-name "webkit_web_frame_reload")
479   (return-type "none")
482 (define-method find_frame
483   (of-object "WebKitWebFrame")
484   (c-name "webkit_web_frame_find_frame")
485   (caller-owns-return #f)
486   (return-type "WebKitWebFrame*")
487   (parameters
488    '("const-gchar*" "name")
489    )
492 (define-method get_global_context
493   (of-object "WebKitWebFrame")
494   (c-name "webkit_web_frame_get_global_context")
495   (return-type "JSGlobalContextRef")
498 ;; From <webkit/webkitknetworkrequest.h>
500 (define-function webkit_network_request_new
501   (is-constructor-of "WebKitNetworkRequest")
502   (c-name "webkit_network_request_new")
503   (caller-owns-return #t)
504   (return-type "WebKitNetworkRequest*")
505   (properties
506    '("uri" (argname "uri"))
507    )
510 (define-method set_uri
511   (of-object "WebKitNetworkRequest")
512   (c-name "webkit_network_request_set_uri")
513   (return-type "none")
514   (parameters
515    '("const-gchar*" "uri")
516    )
519 (define-method get_uri
520   (of-object "WebKitNetworkRequest")
521   (c-name "webkit_network_request_get_uri")
522   (return-type "const-gchar*")
526 ;; From <webkit/webkitwebhistoryitem.h>
528 (define-function webkit_web_history_item_new
529   (is-constructor-of "WebKitWebHistoryItem")
530   (c-name "webkit_web_history_item_new")
531   (caller-owns-return #t)
532   (return-type "WebKitWebHistoryItem*")
535 (define-function webkit_web_history_item_new_with_data
536   (is-constructor-of "WebKitWebHistoryItem")
537   (c-name "webkit_web_history_item_new_with_data")
538   (caller-owns-return #t)
539   (return-type "WebKitWebHistoryItem*")
540   (properties
541    '("uri" (argname "uri"))
542    '("title" (argname "title"))
543    )
546 (define-method get_title
547   (of-object "WebKitWebHistoryItem")
548   (c-name "webkit_web_history_item_get_title")
549   (return-type "const-gchar*")
552 (define-method get_alternate_title
553   (of-object "WebKitWebHistoryItem")
554   (c-name "webkit_web_history_item_get_alternate_title")
555   (return-type "const-gchar*")
558 (define-method set_alternate_title
559   (of-object "WebKitWebHistoryItem")
560   (c-name "webkit_web_history_item_set_alternate_title")
561   (parameters
562    '("const-gchar*" "title")
563    )
566 (define-method get_uri
567   (of-object "WebKitWebHistoryItem")
568   (c-name "webkit_web_history_item_get_uri")
569   (return-type "const-gchar*")
572 (define-method get_original_uri
573   (of-object "WebKitWebHistoryItem")
574   (c-name "webkit_web_history_item_get_original_uri")
575   (return-type "const-gchar*")
578 (define-method get_last_visited_time
579   (of-object "WebKitWebHistoryItem")
580   (c-name "webkit_web_history_item_get_last_visited_time")
581   (return-type "gdouble")
585 ;; From <webkit/webkitwebbackforwardlist.h>
587 (define-function webkit_web_back_forward_list_new_with_web_view
588   (is-constructor-of "WebKitWebBackForwardList")
589   (c-name "webkit_web_back_forward_list_new_with_web_view")
590   (caller-owns-return #t)
591   (return-type "WebKitWebHistoryItem*")
594 (define-method go_forward
595   (of-object "WebKitWebBackForwardList")
596   (c-name "webkit_web_back_forward_list_go_forward")
597   (return-type "none")
600 (define-method go_back
601   (of-object "WebKitWebBackForwardList")
602   (c-name "webkit_web_back_forward_list_go_back")
603   (return-type "none")
606 (define-method contains_item
607   (of-object "WebKitWebBackForwardList")
608   (c-name "webkit_web_back_forward_list_contains_item")
609   (return-type "gboolean")
610   (parameters
611    '("WebKitWebHistoryItem*" "history_item")
612    )
615 (define-method go_to_item
616   (of-object "WebKitWebBackForwardList")
617   (c-name "webkit_web_back_forward_list_go_to_item")
618   (return-type "none")
619   (parameters
620    '("WebKitWebHistoryItem*" "history_item")
621    )
624 (define-method get_forward_list_with_limit
625   (of-object "WebKitWebBackForwardList")
626   (c-name "webkit_web_back_forward_list_get_forward_list_with_limit")
627   (return-type "GList*")
628   (parameters
629    '("gint" "limit")
630    )
633 (define-method get_back_list_with_limit
634   (of-object "WebKitWebBackForwardList")
635   (c-name "webkit_web_back_forward_list_get_back_list_with_limit")
636   (return-type "GList*")
637   (parameters
638    '("gint" "limit")
639    )
642 (define-method get_back_item
643   (of-object "WebKitWebBackForwardList")
644   (c-name "webkit_web_back_forward_list_get_back_item")
645   (return-type "WebKitWebHistoryItem*")
648 (define-method get_current_item
649   (of-object "WebKitWebBackForwardList")
650   (c-name "webkit_web_back_forward_list_get_current_item")
651   (return-type "WebKitWebHistoryItem*")
654 (define-method get_forward_item
655   (of-object "WebKitWebBackForwardList")
656   (c-name "webkit_web_back_forward_list_get_forward_item")
657   (return-type "WebKitWebHistoryItem*")
660 (define-method get_nth_item
661   (of-object "WebKitWebBackForwardList")
662   (c-name "webkit_web_back_forward_list_get_nth_item")
663   (return-type "WebKitWebHistoryItem*")
664   (parameters
665    '("gint" "index")
666    )
669 (define-method get_back_length
670   (of-object "WebKitWebBackForwardList")
671   (c-name "webkit_web_back_forward_list_get_back_length")
672   (return-type "gint")
675 (define-method get_forward_length
676   (of-object "WebKitWebBackForwardList")
677   (c-name "webkit_web_back_forward_list_get_forward_length")
678   (return-type "gint")
681 (define-method get_limit
682   (of-object "WebKitWebBackForwardList")
683   (c-name "webkit_web_back_forward_list_get_limit")
684   (return-type "gint")
687 (define-method set_limit
688   (of-object "WebKitWebBackForwardList")
689   (c-name "webkit_web_back_forward_list_set_limit")
690   (return-type "none")
691   (parameters
692    '("gint" "limit")
693    )
696 ;; From <webkit/webkitwebsettings.h>
698 (define-function webkit_web_settings_new
699   (is-constructor-of "WebKitWebSettings")
700   (c-name "webkit_web_settings_new")
701   (caller-owns-return #t)
702   (return-type "WebKitWebSettings*")
705 (define-method copy
706   (of-object "WebKitWebSettings")
707   (c-name "webkit_web_settings_copy")
708   (caller-owns-return #f)
709   (return-type "WebKitWebSettings*")