JSON Proxy

JSON Proxy — Wrapper class for JsonObjects

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── FontManagerJsonProxy
        ├── FontManagerFamily
        ├── FontManagerFont
        ├── FontManagerFontInfo
        ╰── FontManagerOrthography

Includes

#include <font-manager-json-proxy.h>

Description

Simple wrapper around a JsonObject which maps object members to gobject properties.

Functions

font_manager_json_proxy_new ()

FontManagerJsonProxy *
font_manager_json_proxy_new (void);

Returns

A newly created FontManagerJsonProxy. Free the returned object using g_object_unref().

[transfer full]


font_manager_json_proxy_install_properties ()

void
font_manager_json_proxy_install_properties
                               (FontManagerJsonProxyClass *klass);

properties and n_properties MUST be set before calling this method.

A property with type G_TYPE_BOXED is assumed to be a JsonArray. A property with type JSON_TYPE_OBJECT is assumed to be the source -object.

[skip]

Parameters

Types and Values

FONT_MANAGER_JSON_PROXY_SOURCE

#define FONT_MANAGER_JSON_PROXY_SOURCE "source-object"

FontManagerJsonProxyProperty

typedef struct _ObjectProperty FontManagerJsonProxyProperty;

This struct provides the information required to map a member of a JsonObject to a gobject property in a FontManagerJsonProxy subclass.


FONT_MANAGER_TYPE_JSON_PROXY

#define FONT_MANAGER_TYPE_JSON_PROXY (font_manager_json_proxy_get_type ())

struct FontManagerJsonProxyClass

struct FontManagerJsonProxyClass {
    GObjectClass parent_class;

    gint n_properties;
    const FontManagerJsonProxyProperty *properties;
};

Members

gint n_properties;

of members in the JsonObject backing this class

 

const FontManagerJsonProxyProperty *properties;

an array of FontManagerJsonProxyProperty describing the members

 

FontManagerJsonProxy

typedef struct _FontManagerJsonProxy FontManagerJsonProxy;