Add boilerplate
This commit is contained in:
parent
977ec2b1b9
commit
f1f6eb4720
|
@ -0,0 +1,14 @@
|
|||
import CGLib
|
||||
import CCairo
|
||||
import CPango
|
||||
import CGdkPixbuf
|
||||
import CGdk
|
||||
import GLib
|
||||
import GObject
|
||||
import Pango
|
||||
import Cairo
|
||||
import PangoCairo
|
||||
import GdkPixbuf
|
||||
|
||||
// missing header file type aliases
|
||||
public typealias GdkXEvent = _GdkXEvent
|
|
@ -0,0 +1,7 @@
|
|||
s/GObject.Callback/Callback/g
|
||||
s/EVENT_STOP: Bool = 5/EVENT_STOP: gboolean = 1/
|
||||
s/gdk_cursor_ref/g_object_ref/g
|
||||
s/gdk_cursor_unref/g_object_unref/g
|
||||
s/create_similar_image_surface(format: CInt/create_similar_image_surface(format: cairo_format_t/
|
||||
s/cairo.Content/Content/g
|
||||
s/-> GdkAtom {/-> GdkAtom! {/g
|
|
@ -0,0 +1,2 @@
|
|||
EVENT_STOP
|
||||
PRIORITY_REDRAW
|
|
@ -0,0 +1,3 @@
|
|||
Color
|
||||
Gravity
|
||||
Rectangle
|
|
@ -3,7 +3,8 @@ import PackageDescription
|
|||
let package = Package(
|
||||
name: "Gdk",
|
||||
dependencies: [
|
||||
.Package(url: "https://github.com/rhx/CGdk.git", majorVersion: 1),
|
||||
.Package(url: "https://github.com/rhx/SwiftGdkPixbuf.git", majorVersion: 2),
|
||||
.Package(url: "https://github.com/rhx/SwiftPangoCairo.git", majorVersion: 2)
|
||||
]
|
||||
)
|
||||
)
|
||||
|
|
2
build.sh
2
build.sh
|
@ -23,5 +23,5 @@ if [ ! -e "${GIR}" ] ; then
|
|||
fi
|
||||
LINKFLAGS=`pkg-config --libs $module pangocairo pangoft2 pango gobject-2.0 gio-unix-2.0 glib-2.0 | tr ' ' '\n' | sed 's/^/-Xlinker /' | tr '\n' ' '`
|
||||
CCFLAGS=`pkg-config --cflags $module pangocairo pangoft2 pango gobject-2.0 gio-unix-2.0 glib-2.0 | tr ' ' '\n' | sed 's/^/-Xcc /' | tr '\n' ' ' `
|
||||
gir2swift -p ${GIR_DIR}/GLib-2.0.gir -p ${GIR_DIR}/GObject-2.0.gir -p ${GIR_DIR}/Pango-1.0.gir -p ${GIR_DIR}/Cairo-1.0.gir -p ${GIR_DIR}/PangoCairo-1.0.gir "${GIR}" | sed -f ${module}.sed > Sources/${Module}.swift
|
||||
gir2swift -p ${GIR_DIR}/GLib-2.0.gir -p ${GIR_DIR}/GObject-2.0.gir -p ${GIR_DIR}/Pango-1.0.gir -p ${GIR_DIR}/Cairo-1.0.gir -p ${GIR_DIR}/PangoCairo-1.0.gir -p ${GIR_DIR}/GdkPixbuf-2.0.gir "${GIR}" | sed -f ${module}.sed > Sources/${Module}.swift
|
||||
swift build $CCFLAGS $LINKFLAGS "$@"
|
||||
|
|
Loading…
Reference in New Issue