2 ;; PyWebKitGtk - Python bindings to WebKit/GTK+
4 ;; Copyright (C) 2009 Jan Michael Alonzo <jmalonzo@gmail.com>
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.
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.
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 ;; from webkit/webkitwebinspector.h
23 (define-method get_web_view
24 (of-object "WebKitWebInspector")
25 (c-name "webkit_web_inspector_get_web_view")
26 (return-type "WebKitWebView*")
29 (define-method get_inspected_uri
30 (of-object "WebKitWebInspector")
31 (c-name "webkit_web_inspector_get_inspected_uri")
32 (return-type "const-gchar*")
35 ;; from webkit/webkitwebview.h
36 (define-method get_web_inspector
37 (of-object "WebKitWebView")
38 (c-name "webkit_web_view_get_inspector")
39 (return-type "WebKitWebInspector*")
42 (define-method get_window_features
43 (of-object "WebKitWebView")
44 (c-name "webkit_web_view_get_window_features")
45 (return-type "WebKitWebWindowFeatures*")
48 (define-method reload_bypass_cache
49 (of-object "WebKitWebView")
50 (c-name "webkit_web_view_reload_bypass_cache")
54 (define-method can_show_mime_type
55 (of-object "WebKitWebView")
56 (c-name "webkit_web_view_can_show_mime_type")
57 (return-type "gboolean")
59 '("const-gchar*" "mime_type")
63 (define-method load_uri
64 (of-object "WebKitWebView")
65 (c-name "webkit_web_view_load_uri")
68 '("const-gchar*" "uri")
72 (define-method get_encoding
73 (of-object "WebKitWebView")
74 (c-name "webkit_web_view_get_encoding")
75 (return-type "const-gchar*")
78 (define-method set_custom_encoding
79 (of-object "WebKitWebView")
80 (c-name "webkit_web_view_set_custom_encoding")
83 '("const-gchar*" "encoding")
87 (define-method get_custom_encoding
88 (of-object "WebKitWebView")
89 (c-name "webkit_web_view_get_custom_encoding")
90 (return-type "const-gchar*")
93 (define-method move_cursor
94 (of-object "WebKitWebView")
95 (c-name "webkit_web_view_move_cursor")
97 '("GtkMovementStep" "step")
103 (define-method get_load_status
104 (of-object "WebKitWebView")
105 (c-name "webkit_web_view_get_load_status")
106 (return-type "WebKitLoadStatus")
109 (define-method get_progress
110 (of-object "WebKitWebView")
111 (c-name "webkit_web_view_get_progress")
112 (return-type "gdouble")
116 (of-object "WebKitWebView")
117 (c-name "webkit_web_view_undo")
121 (define-method can_undo
122 (of-object "WebKitWebView")
123 (c-name "webkit_web_view_can_undo")
128 (of-object "WebKitWebView")
129 (c-name "webkit_web_view_redo")
133 (define-method can_redo
134 (of-object "WebKitWebView")
135 (c-name "webkit_web_view_can_redo")
139 (define-method set_view_source_mode
140 (of-object "WebKitWebView")
141 (c-name "webkit_web_view_set_view_source_mode")
143 '("gboolean" "view_source_mode")
147 (define-method get_view_source_mode
148 (of-object "WebKitWebView")
149 (c-name "webkit_web_view_get_view_source_mode")
150 (return-type "gboolean")
153 ;; from webkit/webkitwebwindowfeatures.h
154 (define-function webkit_web_window_features_new
155 (is-constructor-of "WebKitWebWindowFeatures")
156 (c-name "webkit_web_window_features_new")
157 (caller-owns-return #t)
158 (return-type "WebKitWebWindowFeatures*")
162 (of-object "WebKitWebWindowFeatures")
163 (c-name "webkit_web_window_features_equal")
164 (return-type "gboolean")
166 '("WebKitWebWindowFeatures*" "other_features")
170 ;; from webkit/webkitwebnavigationaction.h
172 (define-method get_reason
173 (of-object "WebKitWebNavigationAction")
174 (c-name "webkit_web_navigation_action_get_reason")
175 (return-type "WebKitWebNavigationReason")
178 (define-method set_reason
179 (of-object "WebKitWebNavigationAction")
180 (c-name "webkit_web_navigation_action_set_reason")
183 '("WebKitWebNavigationReason" "reason")
187 (define-method get_original_uri
188 (of-object "WebKitWebNavigationAction")
189 (c-name "webkit_web_navigation_action_get_original_uri")
190 (return-type "const-gchar*")
193 (define-method set_original_uri
194 (of-object "WebKitWebNavigationAction")
195 (c-name "webkit_web_navigation_action_set_original_uri")
198 '("const-gchar*" "original_uri")
202 (define-method get_button
203 (of-object "WebKitWebNavigationAction")
204 (c-name "webkit_web_navigation_action_get_button")
208 (define-method get_modifier_state
209 (of-object "WebKitWebNavigationAction")
210 (c-name "webkit_web_navigation_action_get_modifier_state")
214 ;; from webkit/webkitwebpolicydecision.h
217 (of-object "WebKitWebPolicyDecision")
218 (c-name "webkit_web_policy_decision_use")
222 (define-method ignore
223 (of-object "WebKitWebPolicyDecision")
224 (c-name "webkit_web_policy_decision_ignore")
228 (define-method download
229 (of-object "WebKitWebPolicyDecision")
230 (c-name "webkit_web_policy_decision_download")
234 ;; from webkit/webkitwebbackforwardlist.h
236 (define-method add_item
237 (of-object "WebKitWebBackForwardList")
238 (c-name "webkit_web_back_forward_list_add_item")
241 '("WebKitWebHistoryItem*" "history_item")
245 ;; from webkit/webkitwebframe.h
247 (define-method load_uri
248 (of-object "WebKitWebFrame")
249 (c-name "webkit_web_frame_load_uri")
252 '("const-gchar*" "uri")
256 (define-method load_string
257 (of-object "WebKitWebFrame")
258 (c-name "webkit_web_frame_load_string")
261 '("const-gchar*" "content")
262 ("const-gchar*" "mime_type")
263 ("const-gchar*" "encoding")
264 ("const-gchar*" "base_uri")
268 (define-method print_full
269 (of-object "WebKitWebFrame")
270 (c-name "webkit_web_frame_print_full")
271 (return-type "GtkPrintOperationResult")
273 '("GtkPrintOperation*" "operation")
274 ("GtkPrintOperationAction" "action")
280 (of-object "WebKitWebFrame")
281 (c-name "webkit_web_frame_print")
285 (define-method get_security_origin
286 (of-object "WebKitWebFrame")
287 (c-name "webkit_web_frame_get_security_origin")
288 (return-type "WebKitSecurityOrigin*")
291 (define-method get_data_source
292 (of-object "WebKitWebFrame")
293 (c-name "webkit_web_frame_get_data_source")
294 (return-type "WebKitWebDataSource*")
297 (define-method get_provisional_data_source
298 (of-object "WebKitWebFrame")
299 (c-name "webkit_web_frame_get_provisional_data_source")
300 (return-type "WebKitWebDataSource*")
303 ;; from webkit/webkitdownload.h
304 (define-function webkit_download_new
305 (is-constructor-of "WebKitDownload")
306 (c-name "webkit_download_new")
307 (caller-owns-return #t)
308 (return-type "WebKitDownload*")
312 (of-object "WebKitDownload")
313 (c-name "webkit_download_start")
317 (define-method cancel
318 (of-object "WebKitDownload")
319 (c-name "webkit_download_cancel")
323 (define-method get_uri
324 (of-object "WebKitDownload")
325 (c-name "webkit_download_get_uri")
326 (return-type "const-gchar*")
329 (define-method get_network_request
330 (of-object "WebKitDownload")
331 (c-name "webkit_download_get_network_request")
332 (return-type "WebKitNetworkRequest*")
335 (define-method get_suggested_filename
336 (of-object "WebKitDownload")
337 (c-name "webkit_download_get_suggested_filename")
338 (return-type "const-gchar*")
341 (define-method get_destination_uri
342 (of-object "WebKitDownload")
343 (c-name "webkit_download_get_destination_uri")
344 (return-type "const-gchar*")
347 (define-method set_destination_uri
348 (of-object "WebKitDownload")
349 (c-name "webkit_download_set_destination_uri")
352 '("const-gchar*" "destination_uri")
356 (define-method get_progress
357 (of-object "WebKitDownload")
358 (c-name "webkit_download_get_progress")
359 (return-type "gdouble")
362 (define-method get_elapsed_time
363 (of-object "WebKitDownload")
364 (c-name "webkit_download_get_elapsed_time")
365 (return-type "gdouble")
368 (define-method get_total_size
369 (of-object "WebKitDownload")
370 (c-name "webkit_download_get_total_size")
371 (return-type "guint64")
374 (define-method get_current_size
375 (of-object "WebKitDownload")
376 (c-name "webkit_download_get_current_size")
377 (return-type "guint64")
380 (define-method get_status
381 (of-object "WebKitDownload")
382 (c-name "webkit_download_get_status")
383 (return-type "WebKitDownloadStatus")
386 ;; From <webkit/webkitnetworkresponse.h>
388 (define-function webkit_network_response_new
389 (is-constructor-of "WebKitNetworkResponse")
390 (c-name "webkit_network_response_new")
391 (caller-owns-return #t)
392 (return-type "WebKitNetworkResponse*")
394 '("uri" (argname "uri"))
398 (define-method set_uri
399 (of-object "WebKitNetworkResponse")
400 (c-name "webkit_network_response_set_uri")
403 '("const-gchar*" "uri")
407 (define-method get_uri
408 (of-object "WebKitNetworkResponse")
409 (c-name "webkit_network_response_get_uri")
410 (return-type "const-gchar*")
413 ;; From <webkit/webkitsecurityorigin.h>
415 (define-method get_host
416 (of-object "WebKitSecurityOrigin")
417 (c-name "webkit_security_origin_get_host")
418 (return-type "const-gchar*")
421 (define-method get_protocol
422 (of-object "WebKitSecurityOrigin")
423 (c-name "webkit_security_origin_get_protocol")
424 (return-type "const-gchar*")
427 (define-method get_port
428 (of-object "WebKitSecurityOrigin")
429 (c-name "webkit_security_origin_get_port")
430 (return-type "guint")
433 (define-method get_web_database_usage
434 (of-object "WebKitSecurityOrigin")
435 (c-name "webkit_security_origin_get_web_database_usage")
436 (return-type "guint64")
439 (define-method get_web_database_quota
440 (of-object "WebKitSecurityOrigin")
441 (c-name "webkit_security_origin_get_web_database_quota")
442 (return-type "guint64")
445 (define-method set_web_database_quota
446 (of-object "WebKitSecurityOrigin")
447 (c-name "webkit_security_origin_set_web_database_quota")
454 (define-method get_all_web_databases
455 (of-object "WebKitSecurityOrigin")
456 (c-name "webkit_security_origin_get_all_web_databases")
457 (return-type "GList*")
460 ;; From <webkit/webkitwebdatabase.h>
462 (define-method get_security_origin
463 (of-object "WebKitWebDatabase")
464 (c-name "webkit_web_database_get_security_origin")
465 (return-type "WebKitSecurityOrigin*")
468 (define-method get_name
469 (of-object "WebKitWebDatabase")
470 (c-name "webkit_web_database_get_name")
471 (return-type "const-gchar*")
474 (define-method get_display_name
475 (of-object "WebKitWebDatabase")
476 (c-name "webkit_web_database_get_display_name")
477 (return-type "const-gchar*")
480 (define-method get_expected_size
481 (of-object "WebKitWebDatabase")
482 (c-name "webkit_web_database_get_expected_size")
483 (return-type "guint64")
486 (define-method get_size
487 (of-object "WebKitWebDatabase")
488 (c-name "webkit_web_database_get_size")
489 (return-type "guint64")
492 (define-method get_filename
493 (of-object "WebKitWebDatabase")
494 (c-name "webkit_web_database_get_filename")
495 (return-type "const-gchar*")
498 (define-method remove
499 (of-object "WebKitWebDatabase")
500 (c-name "webkit_web_database_remove")
504 (define-function remove_all_web_databases
505 (c-name "webkit_remove_all_web_databases")
509 (define-function get_web_database_directory_path
510 (c-name "webkit_get_web_database_directory_path")
511 (return-type "const-gchar*")
514 (define-function set_web_database_directory_path
515 (c-name "webkit_set_web_database_directory_path")
518 '("const-gchar*" "path")
522 (define-function get_default_web_database_quota
523 (c-name "webkit_get_default_web_database_quota")
524 (return-type "guint64")
527 (define-function set_default_web_database_quota
528 (c-name "webkit_set_default_web_database_quota")
531 '("guint64" "default_quota")
535 ;; From <webkit/webkitwebdatasource.h>
537 (define-function webkit_web_data_source_new
538 (is-constructor-of "WebKitWebDataSource")
539 (c-name "webkit_web_data_source_new")
540 (caller-owns-return #t)
541 (return-type "WebKitWebDataSource*")
544 (define-method get_web_frame
545 (of-object "WebKitWebDataSource")
546 (c-name "webkit_web_data_source_get_web_frame")
547 (return-type "WebKitWebFrame*")
550 (define-method get_initial_request
551 (of-object "WebKitWebDataSource")
552 (c-name "webkit_web_data_source_get_initial_request")
553 (return-type "WebKitNetworkRequest*")
556 (define-method get_request
557 (of-object "WebKitWebDataSource")
558 (c-name "webkit_web_data_source_get_request")
559 (return-type "WebKitNetworkRequest*")
562 (define-method get_encoding
563 (of-object "WebKitWebDataSource")
564 (c-name "webkit_web_data_source_get_encoding")
565 (return-type "const-gchar*")
568 (define-method is_loading
569 (of-object "WebKitWebDataSource")
570 (c-name "webkit_web_data_source_is_loading")
571 (return-type "gboolean")
574 (define-method get_data
575 (of-object "WebKitWebDataSource")
576 (c-name "webkit_web_data_source_get_data")
577 (return-type "GString*")
580 (define-method get_main_resource
581 (of-object "WebKitWebDataSource")
582 (c-name "webkit_web_data_source_get_main_resource")
583 (return-type "WebKitWebResource*")
586 (define-method get_unreachable_uri
587 (of-object "WebKitWebDataSource")
588 (c-name "webkit_web_data_source_get_unreachable_uri")
589 (return-type "const-gchar*")
592 ;; From <webkit/webkitwebresource.h>
594 (define-function webkit_web_resource_new
595 (is-constructor-of "WebKitWebResource")
596 (c-name "webkit_web_resource_new")
597 (caller-owns-return #t)
598 (return-type "WebKitWebResource*")
600 '("data" (argname "data"))
601 '("size" (argname "size"))
602 '("uri" (argname "uri"))
603 '("mime_type" (argname "mime_type"))
604 '("encoding" (argname "encoding"))
605 '("frame_name" (argname "frame_name"))
609 (define-method get_data
610 (of-object "WebKitWebResource")
611 (c-name "webkit_web_resource_get_data")
612 (return-type "GString*")
615 (define-method get_uri
616 (of-object "WebKitWebResource")
617 (c-name "webkit_web_resource_get_uri")
618 (return-type "const-gchar*")
621 (define-method get_mime_type
622 (of-object "WebKitWebResource")
623 (c-name "webkit_web_resource_get_mime_type")
624 (return-type "const-gchar*")
627 (define-method get_encoding
628 (of-object "WebKitWebResource")
629 (c-name "webkit_web_resource_get_encoding")
630 (return-type "const-gchar*")
633 (define-method get_frame_name
634 (of-object "WebKitWebResource")
635 (c-name "webkit_web_resource_get_frame_name")
636 (return-type "const-gchar*")