module GPhoto2::Context::Callbacks

Overview

Provides callbacks for libgphoto2.

Direct including types

Defined in:

gphoto2/context/callbacks.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Macro Detail

macro set_callback(key, callback_type, args, &block) #

[View source]

Instance Method Detail

def cancel_callback : Proc(Bool) #

def cancel_callback=(callback : Proc(Bool) | Nil) : Nil #

Sets cancel callback. Pass nil to remove it.

See: LibGPhoto2#gp_context_set_cancel_func


[View source]
def cancel_callback? : Proc(Bool) | Nil #

def check!(rc : Int32) : Int32 #

Checks if the given rc is a GPhoto2 error code.


[View source]
def clear_callbacks : Nil #

Clears all callbacks.


[View source]
def error_callback : Proc(String, Void) #

def error_callback=(callback : Proc(String, Void) | Nil) : Nil #

Sets error callback. Pass nil to remove it.

See: LibGPhoto2#gp_context_set_error_func


def error_callback? : Proc(String, Void) | Nil #

def idle_callback : Proc(Void) #

def idle_callback=(callback : Proc(Void) | Nil) : Nil #

Sets idle callback. Pass nil to remove it.

See: LibGPhoto2#gp_context_set_idle_func


[View source]
def idle_callback? : Proc(Void) | Nil #

def last_error : String | Nil #

[View source]
def message_callback : Proc(String, Void) #

def message_callback=(callback : Proc(String, Void) | Nil) : Nil #

Sets message callback. Pass nil to remove it.

See: LibGPhoto2#gp_context_set_message_func


def message_callback? : Proc(String, Void) | Nil #

def status_callback : Proc(String, Void) #

def status_callback=(callback : Proc(String, Void) | Nil) : Nil #

Sets status callback. Pass nil to remove it.

See: LibGPhoto2#gp_context_set_status_func


def status_callback? : Proc(String, Void) | Nil #