Module: Imlib2::Cache

### Home Classes Methods

### In Files

- imlib2.c

### Methods

- ::flush_font_cache
- ::font
- ::font=
- ::font_cache
- ::font_cache=
- ::get_font_cache
- ::get_image_cache
- ::image
- ::image=
- ::image_cache
- ::image_cache=
- ::set_font_cache
- ::set_image_cache

### Files

- AUTHORS
- COPYING
- ChangeLog
- README
- TODO

### Class/Module Index

Quicksearch

- Imlib2
- Imlib2::Border
- Imlib2::Cache
- Imlib2::Color
- Imlib2::Color::CmyaColor
- Imlib2::Color::HlsaColor
- Imlib2::Color::HsvaColor
- Imlib2::Color::RgbaColor
- Imlib2::ColorModifier
- Imlib2::Context
- Imlib2::Dir
- Imlib2::Direction
- Imlib2::Encoding
- Imlib2::Error
- Imlib2::Error::DeletedError
- Imlib2::FileError
- Imlib2::Filter
- Imlib2::Font
- Imlib2::Gradient
- Imlib2::Image
- Imlib2::Op
- Imlib2::Operation
- Imlib2::Polygon

No matching classes.

# Imlib2::Cache

### Public Class Methods

flush_font_cache() click to toggle source

Flush and return the new size (in bytes) of the application-wide font cache.

Example:

    new_size = Imlib2::Cache::flush_font_cache

    static VALUE cache_flush_font(VALUE klass) {
      imlib_flush_font_cache();
      return cache_font(klass);
    }

font() click to toggle source

Return the size (in bytes) of the application-wide font cache.

Examples:

    size = Imlib2::Cache::get_font_cache
    size = Imlib2::Cache::font_cache
    size = Imlib2::Cache::font

    static VALUE cache_font(VALUE klass) {
      UNUSED(klass);
      return INT2FIX(imlib_get_font_cache_size());
    }

font=(p1) click to toggle source

Set the size (in bytes) of the application-wide font cache. Examples:

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::set_font_cache new_size

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::font_cache = new_size

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::font = new_size

    static VALUE cache_set_font(VALUE klass, VALUE val) {
      UNUSED(klass);
      imlib_set_font_cache_size(NUM2INT(val));
      return Qtrue;
    }

font_cache() click to toggle source

Return the size (in bytes) of the application-wide font cache.

Examples:

    size = Imlib2::Cache::get_font_cache
    size = Imlib2::Cache::font_cache
    size = Imlib2::Cache::font

    static VALUE cache_font(VALUE klass) {
      UNUSED(klass);
      return INT2FIX(imlib_get_font_cache_size());
    }

font_cache=(p1) click to toggle source

Set the size (in bytes) of the application-wide font cache. Examples:

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::set_font_cache new_size

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::font_cache = new_size

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::font = new_size

    static VALUE cache_set_font(VALUE klass, VALUE val) {
      UNUSED(klass);
      imlib_set_font_cache_size(NUM2INT(val));
      return Qtrue;
    }

get_font_cache() click to toggle source

Return the size (in bytes) of the application-wide font cache.

Examples:

    size = Imlib2::Cache::get_font_cache
    size = Imlib2::Cache::font_cache
    size = Imlib2::Cache::font

    static VALUE cache_font(VALUE klass) {
      UNUSED(klass);
      return INT2FIX(imlib_get_font_cache_size());
    }

get_image_cache() click to toggle source

Return the size (in bytes) of the application-wide image cache.

Examples:

    size = Imlib2::Cache::get_image_cache
    size = Imlib2::Cache::image_cache
    size = Imlib2::Cache::image

    static VALUE cache_image(VALUE klass) {
      UNUSED(klass);
      return INT2FIX(imlib_get_cache_size());
    }

image() click to toggle source

Return the size (in bytes) of the application-wide image cache.

Examples:

    size = Imlib2::Cache::get_image_cache
    size = Imlib2::Cache::image_cache
    size = Imlib2::Cache::image

    static VALUE cache_image(VALUE klass) {
      UNUSED(klass);
      return INT2FIX(imlib_get_cache_size());
    }

image=(p1) click to toggle source

Set the size (in bytes) of the application-wide image cache.

Examples:

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::set_image_cache new_size

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::image_cache = new_size

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::image = new_size

    static VALUE cache_set_image(VALUE klass, VALUE val) {
      UNUSED(klass);
      imlib_set_cache_size(NUM2INT(val));
      return Qtrue;
    }

image_cache() click to toggle source

Return the size (in bytes) of the application-wide image cache.

Examples:

    size = Imlib2::Cache::get_image_cache
    size = Imlib2::Cache::image_cache
    size = Imlib2::Cache::image

    static VALUE cache_image(VALUE klass) {
      UNUSED(klass);
      return INT2FIX(imlib_get_cache_size());
    }

image_cache=(p1) click to toggle source

Set the size (in bytes) of the application-wide image cache.

Examples:

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::set_image_cache new_size

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::image_cache = new_size

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::image = new_size

    static VALUE cache_set_image(VALUE klass, VALUE val) {
      UNUSED(klass);
      imlib_set_cache_size(NUM2INT(val));
      return Qtrue;
    }

set_font_cache(p1) click to toggle source

Set the size (in bytes) of the application-wide font cache. Examples:

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::set_font_cache new_size

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::font_cache = new_size

    new_size = 8 * 1024 ** 2                # 8 megabytes
    Imlib2::Cache::font = new_size

    static VALUE cache_set_font(VALUE klass, VALUE val) {
      UNUSED(klass);
      imlib_set_font_cache_size(NUM2INT(val));
      return Qtrue;
    }

set_image_cache(p1) click to toggle source

Set the size (in bytes) of the application-wide image cache.

Examples:

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::set_image_cache new_size

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::image_cache = new_size

    new_size = 16 * 1024 ** 2               # 16 megabytes
    Imlib2::Cache::image = new_size

    static VALUE cache_set_image(VALUE klass, VALUE val) {
      UNUSED(klass);
      imlib_set_cache_size(NUM2INT(val));
      return Qtrue;
    }

[Validate]

Generated with the Darkfish Rdoc Generator 2.