forked from bonzini/gst-visualgst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GtkWebView.st
42 lines (30 loc) · 944 Bytes
/
GtkWebView.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
GTK.GtkWidget subclass: GtkWebView [
WebKitAvailable := nil.
GtkWebView class >> initialize [
<category: 'initialize'>
DLD addLibrary: 'libwebkit-1.0'.
DLD addLibrary: 'libwebkitgtk-1.0'.
ObjectMemory addDependent: self.
]
GtkWebView class >> update: aSymbol [
<category: 'initialize'>
aSymbol == #returnFromSnapshot ifTrue: [ WebKitAvailable := nil ].
]
GtkWebView class >> hasWebkit [
<category: 'testing'>
^ WebKitAvailable ifNil: [
WebKitAvailable :=
CFunctionDescriptor isFunction: 'webkit_web_view_new' ]
]
GtkWebView class >> new [
<category: 'C call-outs'>
<cCall: 'webkit_web_view_new' returning: #{GtkWebView} args: #( )>
]
openUrl: aString [
<category: 'C call-outs'>
<cCall: 'webkit_web_view_open' returning: #void args: #( #self #string )>
]
]
Eval [
GtkWebView initialize
]