Liking cljdoc? Tell your friends :D
Clojure only.

membrane.skia


*already-drawing*clj

source

*draw-cache*clj

source

*font-cache*clj

source

*image-cache*clj

source

*origin*clj

source

*paint*clj

source

*skia-resource*clj

source

*view*clj

source

*window*clj

source

-character-callbackclj

(-character-callback window window-handle codepoint)
source

-cursor-pos-callbackclj

(-cursor-pos-callback window window-handle x y)
source

-key-callbackclj

(-key-callback window window-handle key scancode action mods)
source

-mainclj

(-main & args)
source

-mouse-button-callbackclj

(-mouse-button-callback window window-handle button action mods)
source

-reshapeclj

(-reshape window window-handle width height)
source

-scroll-callbackclj

(-scroll-callback window window-handle offset-x offset-y)
source

-window-refresh-callbackclj

(-window-refresh-callback window window-handle)
source

argcclj

source

argvclj

source

bstrclj

(bstr num)
source

Buttonclj

source

buttonclj

(button text hover?)
source

byte-array-classclj

source

Cachedclj

source

cached-drawclj

(cached-draw drawable)
source

copy-to-clipboardclj

(copy-to-clipboard s)
source

def-objc-classcljmacro

(def-objc-class kls)
source

DEFAULT-COLORclj

source

defccljmacro

(defc fn-name lib ret)
(defc fn-name lib ret args)
source

defglcljmacro

(defgl fn-name ret)
(defgl fn-name ret args)
source

dispatch-sync!clj

(dispatch-sync! f)
source

draw-buttonclj

(draw-button text hover?)
source

draw-to-image!clj

(draw-to-image! path elem)
(draw-to-image! path elem [w h :as size])
(draw-to-image! path elem [w h :as size] image-format quality clear?)

Creates an image of elem. Returns true on success, false otherwise.

path: the filename to write the image to elem: the graphical element to draw size: the width and height of the image. If size is nil, the bounds and origin of elem will be used. image-format: The image format to use. Should be one of :membrane.skia/image-format-jpeg :membrane.skia/image-format-png :membrane.skia/image-format-webp if image-format is nil, then it will be guessed based on the path's file extension. quality: specifies the image quality to use for lossy image formats like jpeg. defaults to 100 clear?: Specifies if the canvas should be cleared before drawing. defaults to true.

note: draw-to-image does not take into account the content scale of your monitor. ie. if you have a retina display, the image will be lower resolution. if you'd like the same resolution as your retina display, you can do use scale like the following: (skia/draw-to-image! "out@2x.png" (ui/scale 2 2 (ui/label "hello world")))

Creates an image of elem. Returns true on success, false otherwise.

`path`: the filename to write the image to
`elem`: the graphical element to draw
`size`: the width and height of the image. If size is nil, the bounds and origin of elem will be used.
`image-format`: The image format to use. Should be one of
 :membrane.skia/image-format-jpeg
 :membrane.skia/image-format-png
 :membrane.skia/image-format-webp
if `image-format` is nil, then it will be guessed based on the path's file extension.
`quality`: specifies the image quality to use for lossy image formats like jpeg. defaults to 100
`clear?`: Specifies if the canvas should be cleared before drawing. defaults to true.

note: `draw-to-image` does not take into account the content scale of your monitor. ie. if you
have a retina display, the image will be lower resolution. if you'd like the same resolution
as your retina display, you can do use `scale` like the following:
`(skia/draw-to-image! "out@2x.png" (ui/scale 2 2 (ui/label "hello world")))`

sourceraw docstring

email-imageclj

source

fix-press-and-hold!clj

(fix-press-and-hold!)
source

font-dirclj

source

get-fontclj

(get-font font)
source

get-framebuffer-sizeclj

(get-framebuffer-size window-handle)
source

get-main-stclj

(get-main-st)
source

get-window-content-scale-sizeclj

(get-window-content-scale-size window-handle)
source

getClassclj

source

glcljmacro

(gl fn-name)
(gl fn-name args)
source

GL_COLOR_BUFFER_BITclj

source

GL_STENCIL_BUFFER_BITclj

source

GL_UNPACK_ALIGNMENTclj

source

glClearclj

(glClear mask)
source

glClearStencilclj

(glClearStencil s)
source

glfwclj

source

glfw-callcljmacro

(glfw-call ret fn-name & args)
source

glfw-post-empty-eventclj

(glfw-post-empty-event)
source

GLFW_VISIBLEclj

source

GlfwSkiaWindowclj

source

glGetErrorclj

(glGetError)
source

glPixelStoreiclj

(glPixelStorei pname param)
source

glViewportclj

(glViewport x y width height)
source

guess-image-formatclj

(guess-image-format path)
source

horizontal-layoutclj

source

if-classcljmacro

(if-class class-name then)
(if-class class-name then else?)
source

image-drawclj

(image-draw {:keys [image-path size opacity] :as image})
source

image-formatsclj

source

image-sizeclj

source

image-size-rawclj

(image-size-raw image-path)
source

ImageFactorycljprotocol

gets or creates an opengl image texture given some various types

gets or creates an opengl image texture given some various types

get-image-textureclj

(get-image-texture x)
sourceraw docstring

index-for-positionclj

(index-for-position font text px py)
source

int->bytesclj

(int->bytes i)
source

IWindowcljprotocol

cleanup!clj

(cleanup! _)

init!clj

(init! _)

repaint!clj

(repaint! _)

reshape!clj

(reshape! _ width height)

should-close?clj

(should-close? _)
source

key-action-mapclj

source

keycodesclj

source

keymapclj

source

label-drawclj

(label-draw {:keys [text font] :as label})
source

LabelRawclj

source

load-fontclj

(load-font font-path font-size)
source

main-class-loaderclj

source

make-character-callbackclj

(make-character-callback window handler)
source

make-cursor-pos-callbackclj

(make-cursor-pos-callback window handler)
source

make-key-callbackclj

(make-key-callback window handler)
source

make-mouse-button-callbackclj

(make-mouse-button-callback window handler)
source

make-reshape-callbackclj

(make-reshape-callback window handler)
source

make-scroll-callbackclj

(make-scroll-callback window handler)
source

make-uiclj

source

make-window-refresh-callbackclj

(make-window-refresh-callback window handler)
source

membraneskialibclj

source

messagesclj

source

NSDictionaryclj

source

NSNumberclj

source

nsnumber->intclj

(nsnumber->int nsnumber)
source

nsstringclj

(nsstring s)
source

nsstring->strclj

(nsstring->str nsstring)
source

NSUserDefaultsclj

source

objc-callcljmacro

(objc-call obj return-type sel & args)
source

objc-selectorclj

(objc-selector sel)
source

objlibclj

source

openglclj

source

(print-timing & body)
source

push-matrixcljmacro

(push-matrix & args)
source

push-paintcljmacro

(push-paint & args)
source

quit?clj

source

rectangleclj

source

render-textclj

source

runclj

(run make-ui)
(run make-ui
     {:keys [window-start-width window-start-height window-start-x
             window-start-y handlers]
      :as options})

Open a window and call make-ui to draw. Returns a channel that is closed when the window is closed.

make-ui should be a 0 argument function that returns an object satisfying IDraw. make-ui will be called for every repaint. Repaints occur on every event. You can also trigger a repaint by calling glfw-post-empty-event.

options is a map that can contain the following keys Optional parameters

window-start-width: the starting width of the window window-start-height: the starting height of the window note: The window may be resized.

window-start-x: the starting x coordinate of the top left corner of the window window-start-y: the starting y coordinate of the top left corner of the window note: The window may be moved.

handlers: A map of callback backs for glfw events The events correspond to the available glfw events. If no handlers map is provided, then the defaults are used. If a handlers key is provided, it does not replace the defaults, but get merged into the defaults.

available handler events :key args are [window window-handle key scancode action mods]. default is -key-callback. :char args are [window window-handle codepoint]. default is -character-callback. :mouse-button args are [window window-handle button action mods]. default is -mouse-button-callback. :reshape args are [window window-handle width height]. default is -reshape. :scroll args are [window window-handle offset-x offset-y]. default is -scroll-callback. :refresh args are [window window-handle]. default is -window-refresh-callback. :cursor args are [window window-handle x y]. default is -cursor-pos-callback.

For each handler, window is the GlfwSkiaWindow and window-handle is a jna pointer to the glfw pointer.

Open a window and call `make-ui` to draw. Returns a channel that is closed when the window is closed.

`make-ui` should be a 0 argument function that returns an object satisfying `IDraw`.
`make-ui` will be called for every repaint. Repaints occur on every event. You can also trigger a repaint by calling `glfw-post-empty-event`.

`options` is a map that can contain the following keys
Optional parameters

`window-start-width`: the starting width of the window
`window-start-height`: the starting height of the window
note: The window may be resized.

`window-start-x`: the starting x coordinate of the top left corner of the window
`window-start-y`: the starting y coordinate of the top left corner of the window
note: The window may be moved.

`handlers`: A map of callback backs for glfw events
The events correspond to the available glfw events. If no `handlers` map is provided, then the defaults are used.
If a handlers key is provided, it does not replace the defaults, but get merged into the defaults.

available handler events
:key args are [window window-handle key scancode action mods]. default is -key-callback.
:char args are [window window-handle codepoint]. default is -character-callback.
:mouse-button args are [window window-handle button action mods]. default is -mouse-button-callback.
:reshape args are [window window-handle width height]. default is -reshape.
:scroll args are [window window-handle offset-x offset-y]. default is -scroll-callback.
:refresh args are [window window-handle]. default is -window-refresh-callback.
:cursor args are [window window-handle x y]. default is -cursor-pos-callback.

For each handler, `window` is the GlfwSkiaWindow and window-handle is a jna pointer to the glfw pointer.

sourceraw docstring

run-helperclj

(run-helper window-chan)
source

run-syncclj

(run-sync make-ui)
(run-sync make-ui
          {:keys [window-start-width window-start-height window-start-x
                  window-start-y handlers]
           :as options})

Open a window and call make-ui to draw. Returns when the window is closed.

make-ui should be a 0 argument function that returns an object satisfying IDraw. make-ui will be called for every repaint. Repaints occur on every event. You can also trigger a repaint by calling glfw-post-empty-event.

options is a map that can contain the following keys Optional parameters

window-start-width: the starting width of the window window-start-height: the starting height of the window note: The window may be resized.

window-start-x: the starting x coordinate of the top left corner of the window window-start-y: the starting y coordinate of the top left corner of the window note: The window may be moved.

handlers: A map of callback backs for glfw events The events correspond to the available glfw events. If no handlers map is provided, then the defaults are used. If a handlers key is provided, it does not replace the defaults, but get merged into the defaults.

available handler events :key args are [window window-handle key scancode action mods]. default is -key-callback. :char args are [window window-handle codepoint]. default is -character-callback. :mouse-button args are [window window-handle button action mods]. default is -mouse-button-callback. :reshape args are [window window-handle width height]. default is -reshape. :scroll args are [window window-handle offset-x offset-y]. default is -scroll-callback. :refresh args are [window window-handle]. default is -window-refresh-callback. :cursor args are [window window-handle x y]. default is -cursor-pos-callback.

For each handler, window is the GlfwSkiaWindow and window-handle is a jna pointer to the glfw pointer.

Open a window and call `make-ui` to draw. Returns when the window is closed.

`make-ui` should be a 0 argument function that returns an object satisfying `IDraw`.
`make-ui` will be called for every repaint. Repaints occur on every event. You can also trigger a repaint by calling `glfw-post-empty-event`.

`options` is a map that can contain the following keys
Optional parameters

`window-start-width`: the starting width of the window
`window-start-height`: the starting height of the window
note: The window may be resized.

`window-start-x`: the starting x coordinate of the top left corner of the window
`window-start-y`: the starting y coordinate of the top left corner of the window
note: The window may be moved.

`handlers`: A map of callback backs for glfw events
The events correspond to the available glfw events. If no `handlers` map is provided, then the defaults are used.
If a handlers key is provided, it does not replace the defaults, but get merged into the defaults.

available handler events
:key args are [window window-handle key scancode action mods]. default is -key-callback.
:char args are [window window-handle codepoint]. default is -character-callback.
:mouse-button args are [window window-handle button action mods]. default is -mouse-button-callback.
:reshape args are [window window-handle width height]. default is -reshape.
:scroll args are [window window-handle offset-x offset-y]. default is -scroll-callback.
:refresh args are [window window-handle]. default is -window-refresh-callback.
:cursor args are [window window-handle x y]. default is -cursor-pos-callback.

For each handler, `window` is the GlfwSkiaWindow and window-handle is a jna pointer to the glfw pointer.

sourceraw docstring

save-canvascljmacro

(save-canvas & args)
source

scissor-drawclj

(scissor-draw scissor-view)
source

scrollview-drawclj

(scrollview-draw scrollview)
source

skia-set-alphaclj

(skia-set-alpha skia-resource alpha)
source

skia-set-colorclj

(skia-set-color skia-resource [r g b a])
source

skia-set-stroke-widthclj

(skia-set-stroke-width skia-resource width)
source

skia-set-styleclj

(skia-set-style skia-resource style)
source

skia-styleclj

source

skia_cleanupclj

(skia_cleanup skia-resource)
source

skia_clearclj

(skia_clear skia-resource)
source

skia_clip_rectclj

(skia_clip_rect skia-resource ox oy w h)
source

skia_draw_imageclj

(skia_draw_image skia-resource image-texture)
source

skia_draw_image_rectclj

(skia_draw_image_rect skia-resource image-texture w h)
source

skia_draw_pathclj

(skia_draw_path skia-resource points points-length)
source

skia_draw_rounded_rectclj

(skia_draw_rounded_rect skia-resource w h radius)
source

skia_flushclj

(skia_flush skia-resource)
source

skia_index_for_positionclj

(skia_index_for_position font-ptr text text-length px)
source

skia_initclj

(skia_init)
source

skia_init_cpuclj

(skia_init_cpu width height)
source

skia_line_heightclj

(skia_line_height font-ptr)
source

skia_load_fontclj

(skia_load_font font-path font-size)
source

skia_load_imageclj

(skia_load_image path)
source

skia_load_image_from_memoryclj

(skia_load_image_from_memory buf buf-length)
source

skia_next_lineclj

(skia_next_line resource font-ptr)
source

skia_offscreen_bufferclj

(skia_offscreen_buffer skia-resource width height xscale yscale)
source

skia_offscreen_imageclj

(skia_offscreen_image skia-resource)
source

skia_osx_run_on_main_thread_syncclj

(skia_osx_run_on_main_thread_sync callback)
source

skia_pop_paintclj

(skia_pop_paint skia-resource)
source

skia_push_paintclj

(skia_push_paint skia-resource)
source

skia_render_cursorclj

(skia_render_cursor skia-resource font-ptr text text-length cursor)
source

skia_render_lineclj

(skia_render_line resource font-ptr line text-length x y)
source

skia_render_selectionclj

(skia_render_selection skia-resource
                       font-ptr
                       text
                       text-length
                       selection-start
                       selection-end)
source

skia_reshapeclj

(skia_reshape skia-resource fb-width fb-height xscale yscale)
source

skia_restoreclj

(skia_restore skia-resource)
source

skia_saveclj

(skia_save skia-resource)
source

skia_save_imageclj

(skia_save_image skia-resource format quality path)
source

skia_set_alphaclj

(skia_set_alpha skia-resource alpha)
source

skia_set_colorclj

(skia_set_color skia-resource r g b a)
source

skia_set_scaleclj

(skia_set_scale skia-resource sx sy)
source

skia_set_stroke_widthclj

(skia_set_stroke_width skia-resource width)
source

skia_set_styleclj

(skia_set_style skia-resource style)
source

skia_text_boundsclj

(skia_text_bounds font-ptr text length minx miny maxx maxy)
source

skia_translateclj

(skia_translate skia-resource x y)
source

slurp-bytesclj

(slurp-bytes x)

Slurp the bytes from a slurpable thing

Slurp the bytes from a slurpable thing
sourceraw docstring

sxclj

source

syclj

source

test-skiaclj

(test-skia)
source

text-boundsclj

(text-bounds font-ptr text)
source

text-cursor-drawclj

(text-cursor-draw {:keys [text font cursor] :as text-cursor})
source

text-selection-drawclj

(text-selection-draw {:keys [text font]
                      [selection-start selection-end] :selection
                      :as text-selection})
source

vertical-layoutclj

source

voidclj

source

window-chanclj

source

with-cpu-skia-resourcecljmacro

(with-cpu-skia-resource resource-sym size & body)
source

wrap-textclj

(wrap-text text n)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close