comparison dwt/internal/cocoa/WebDataSource.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children 1a8b3cb347e0
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
1 /*******************************************************************************
2 * Copyright (c) 2007 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 module dwt.internal.cocoa;
12
13 public class WebDataSource : NSObject {
14
15 public WebDataSource() {
16 super();
17 }
18
19 public WebDataSource(int id) {
20 super(id);
21 }
22
23 //public void addSubresource(WebResource subresource) {
24 // OS.objc_msgSend(this.id, OS.sel_addSubresource_1, subresource !is null ? subresource.id : 0);
25 //}
26
27 public NSData data() {
28 int result = OS.objc_msgSend(this.id, OS.sel_data);
29 return result !is 0 ? new NSData(result) : null;
30 }
31
32 //public id initWithRequest(NSURLRequest request) {
33 // int result = OS.objc_msgSend(this.id, OS.sel_initWithRequest_1, request !is null ? request.id : 0);
34 // return result !is 0 ? new id(result) : null;
35 //}
36
37 //public NSURLRequest initialRequest() {
38 // int result = OS.objc_msgSend(this.id, OS.sel_initialRequest);
39 // return result !is 0 ? new NSURLRequest(result) : null;
40 //}
41
42 public bool isLoading() {
43 return OS.objc_msgSend(this.id, OS.sel_isLoading) !is 0;
44 }
45
46 //public WebResource mainResource() {
47 // int result = OS.objc_msgSend(this.id, OS.sel_mainResource);
48 // return result !is 0 ? new WebResource(result) : null;
49 //}
50
51 public NSString pageTitle() {
52 int result = OS.objc_msgSend(this.id, OS.sel_pageTitle);
53 return result !is 0 ? new NSString(result) : null;
54 }
55
56 public WebDocumentRepresentation representation() {
57 int result = OS.objc_msgSend(this.id, OS.sel_representation);
58 return result !is 0 ? new WebDocumentRepresentation (result) : null;
59 }
60
61 public NSMutableURLRequest request() {
62 int result = OS.objc_msgSend(this.id, OS.sel_request);
63 return result !is 0 ? new NSMutableURLRequest(result) : null;
64 }
65
66 public NSURLResponse response() {
67 int result = OS.objc_msgSend(this.id, OS.sel_response);
68 return result !is 0 ? new NSURLResponse(result) : null;
69 }
70
71 //public WebResource subresourceForURL(NSURL URL) {
72 // int result = OS.objc_msgSend(this.id, OS.sel_subresourceForURL_1, URL !is null ? URL.id : 0);
73 // return result !is 0 ? new WebResource(result) : null;
74 //}
75
76 //public NSArray subresources() {
77 // int result = OS.objc_msgSend(this.id, OS.sel_subresources);
78 // return result !is 0 ? new NSArray(result) : null;
79 //}
80
81 public NSString textEncodingName() {
82 int result = OS.objc_msgSend(this.id, OS.sel_textEncodingName);
83 return result !is 0 ? new NSString(result) : null;
84 }
85
86 //public NSURL unreachableURL() {
87 // int result = OS.objc_msgSend(this.id, OS.sel_unreachableURL);
88 // return result !is 0 ? new NSURL(result) : null;
89 //}
90
91 //public WebArchive webArchive() {
92 // int result = OS.objc_msgSend(this.id, OS.sel_webArchive);
93 // return result !is 0 ? new WebArchive(result) : null;
94 //}
95
96 public WebFrame webFrame() {
97 int result = OS.objc_msgSend(this.id, OS.sel_webFrame);
98 return result !is 0 ? new WebFrame(result) : null;
99 }
100
101 }