Enumerations
3
SWFDEC Library

# Enumerations

enumerations used in Swfdec

## Synopsis

    #include <swfdec/swfdec.h>

    #define             SWFDEC_TYPE_TIME_VAL
    enum                SwfdecAsContextState;
    enum                SwfdecAsDeleteReturn;
    enum                SwfdecLoaderDataType;
    enum                SwfdecLoaderRequest;
    const char*         swfdec_loader_data_type_get_extension
                                                            (SwfdecLoaderDataType type);
    enum                SwfdecAlignment;
    enum                SwfdecKey;
    enum                SwfdecMouseCursor;
    enum                SwfdecScaleMode;

## Description

This file lists all of the enumerations used in various parts of Swfdec.

## Details

### SWFDEC_TYPE_TIME_VAL

    #define SWFDEC_TYPE_TIME_VAL swfdec_time_val_get_type()

This type wraps a `GTimeVal` object as a boxed type and makes it available for use in object properties.

### enum SwfdecAsContextState

    typedef enum {
      SWFDEC_AS_CONTEXT_NEW,
      SWFDEC_AS_CONTEXT_RUNNING,
      SWFDEC_AS_CONTEXT_INTERRUPTED,
      SWFDEC_AS_CONTEXT_ABORTED
    } SwfdecAsContextState;

The state of the context describes what operations are possible on the context. It will be in the state `SWFDEC_AS_CONTEXT_STATE_RUNNING` almost all the time. If it is in the state `SWFDEC_AS_CONTEXT_STATE_ABORTED`, it will not work anymore and every operation on it will instantly fail.

`SWFDEC_AS_CONTEXT_NEW`

  the context is not yet initialized, `swfdec_as_context_startup()` needs to be called.

`SWFDEC_AS_CONTEXT_RUNNING`

  the context is running normally

`SWFDEC_AS_CONTEXT_INTERRUPTED`

  the context has been interrupted by a debugger

`SWFDEC_AS_CONTEXT_ABORTED`

  the context has aborted execution due to a fatal error

### enum SwfdecAsDeleteReturn

    typedef enum {
      SWFDEC_AS_DELETE_NOT_FOUND = 0,
      SWFDEC_AS_DELETE_DELETED,
      SWFDEC_AS_DELETE_NOT_DELETED
    } SwfdecAsDeleteReturn;

This is the return value used by `swfdec_as_object_delete_variable()`. It describes the various outcomes of trying to delete a variable.

`SWFDEC_AS_DELETE_NOT_FOUND`

  The variable was not found and therefore couldn't be deleted.

`SWFDEC_AS_DELETE_DELETED`

  The variable was deleted.

`SWFDEC_AS_DELETE_NOT_DELETED`

  The variable was found but could not be deleted.

### enum SwfdecLoaderDataType

    typedef enum {
      SWFDEC_LOADER_DATA_UNKNOWN,
      SWFDEC_LOADER_DATA_SWF,
      SWFDEC_LOADER_DATA_FLV,
      SWFDEC_LOADER_DATA_XML,
      SWFDEC_LOADER_DATA_TEXT,
      SWFDEC_LOADER_DATA_JPEG,
      SWFDEC_LOADER_DATA_PNG
    } SwfdecLoaderDataType;

This type describes the different types of data that can be loaded inside Swfdec. Swfdec identifies its data streams and you can use the `swfdec_loader_get_data_type()` to acquire more information about the data inside a SwfdecLoader.

`SWFDEC_LOADER_DATA_UNKNOWN`

  Unidentified data or data that cannot be identified.

`SWFDEC_LOADER_DATA_SWF`

  Data describing a normal Flash file.

`SWFDEC_LOADER_DATA_FLV`

  Data describing a Flash video stream.

`SWFDEC_LOADER_DATA_XML`

  Data in XML format.

`SWFDEC_LOADER_DATA_TEXT`

  Textual data.

`SWFDEC_LOADER_DATA_JPEG`

  a JPEG image

`SWFDEC_LOADER_DATA_PNG`

  a PNG image

### enum SwfdecLoaderRequest

    typedef enum {
      SWFDEC_LOADER_REQUEST_DEFAULT = 0,
      SWFDEC_LOADER_REQUEST_GET = 1,
      SWFDEC_LOADER_REQUEST_POST = 2
    } SwfdecLoaderRequest;

Describes the moethod to use for requesting a given URL. These methods map naturally to HTTP methods, since HTTP is the common method for requesting Flash content.

`SWFDEC_LOADER_REQUEST_DEFAULT`

  Use the default method (this most likely is equal to HTTPget)

`SWFDEC_LOADER_REQUEST_GET`

  Use HTTP get

`SWFDEC_LOADER_REQUEST_POST`

  Use HTTP post

### swfdec_loader_data_type_get_extension ()

    const char*         swfdec_loader_data_type_get_extension
                                                            (SwfdecLoaderDataType type);

Queries the extension to be used for data of the given `type`.

`type` :

  a SwfdecLoaderDataType

Returns :

  the typical extension for this data type or the empty string if the type has no extension

### enum SwfdecAlignment

    typedef enum {
      SWFDEC_ALIGNMENT_TOP_LEFT,
      SWFDEC_ALIGNMENT_TOP,
      SWFDEC_ALIGNMENT_TOP_RIGHT,
      SWFDEC_ALIGNMENT_LEFT,
      SWFDEC_ALIGNMENT_CENTER,
      SWFDEC_ALIGNMENT_RIGHT,
      SWFDEC_ALIGNMENT_BOTTOM_LEFT,
      SWFDEC_ALIGNMENT_BOTTOM,
      SWFDEC_ALIGNMENT_BOTTOM_RIGHT
    } SwfdecAlignment;

These are the possible values for the alignment of an unscaled movie.

`SWFDEC_ALIGNMENT_TOP_LEFT`

  top left

`SWFDEC_ALIGNMENT_TOP`

  top

`SWFDEC_ALIGNMENT_TOP_RIGHT`

  top right

`SWFDEC_ALIGNMENT_LEFT`

  left

`SWFDEC_ALIGNMENT_CENTER`

  center

`SWFDEC_ALIGNMENT_RIGHT`

  right

`SWFDEC_ALIGNMENT_BOTTOM_LEFT`

  left

`SWFDEC_ALIGNMENT_BOTTOM`

  bottom

`SWFDEC_ALIGNMENT_BOTTOM_RIGHT`

  bottom right

### enum SwfdecKey

    typedef enum {
      SWFDEC_KEY_BACKSPACE = 8,
      SWFDEC_KEY_TAB = 9,
      SWFDEC_KEY_CLEAR = 12,
      SWFDEC_KEY_ENTER = 13,
      SWFDEC_KEY_SHIFT = 16,
      SWFDEC_KEY_CONTROL = 17,
      SWFDEC_KEY_ALT = 18,
      SWFDEC_KEY_CAPS_LOCK = 20,
      SWFDEC_KEY_ESCAPE = 27,
      SWFDEC_KEY_SPACE = 32,
      SWFDEC_KEY_PAGE_UP = 33,
      SWFDEC_KEY_PAGE_DOWN = 34,
      SWFDEC_KEY_END = 35,
      SWFDEC_KEY_HOME = 36,
      SWFDEC_KEY_LEFT = 37,
      SWFDEC_KEY_UP = 38,
      SWFDEC_KEY_RIGHT = 39,
      SWFDEC_KEY_DOWN = 40,
      SWFDEC_KEY_INSERT = 45,
      SWFDEC_KEY_DELETE = 46,
      SWFDEC_KEY_HELP = 47,
      SWFDEC_KEY_0 = 48,
      SWFDEC_KEY_1 = 49,
      SWFDEC_KEY_2 = 50,
      SWFDEC_KEY_3 = 51,
      SWFDEC_KEY_4 = 52,
      SWFDEC_KEY_5 = 53,
      SWFDEC_KEY_6 = 54,
      SWFDEC_KEY_7 = 55,
      SWFDEC_KEY_8 = 56,
      SWFDEC_KEY_9 = 57,
      SWFDEC_KEY_A = 65,
      SWFDEC_KEY_B = 66,
      SWFDEC_KEY_C = 67,
      SWFDEC_KEY_D = 68,
      SWFDEC_KEY_E = 69,
      SWFDEC_KEY_F = 70,
      SWFDEC_KEY_G = 71,
      SWFDEC_KEY_H = 72,
      SWFDEC_KEY_I = 73,
      SWFDEC_KEY_J = 74,
      SWFDEC_KEY_K = 75,
      SWFDEC_KEY_L = 76,
      SWFDEC_KEY_M = 77,
      SWFDEC_KEY_N = 78,
      SWFDEC_KEY_O = 79,
      SWFDEC_KEY_P = 80,
      SWFDEC_KEY_Q = 81,
      SWFDEC_KEY_R = 82,
      SWFDEC_KEY_S = 83,
      SWFDEC_KEY_T = 84,
      SWFDEC_KEY_U = 85,
      SWFDEC_KEY_V = 86,
      SWFDEC_KEY_W = 87,
      SWFDEC_KEY_X = 88,
      SWFDEC_KEY_Y = 89,
      SWFDEC_KEY_Z = 90,
      SWFDEC_KEY_NUMPAD_0 = 96,
      SWFDEC_KEY_NUMPAD_1 = 97,
      SWFDEC_KEY_NUMPAD_2 = 98,
      SWFDEC_KEY_NUMPAD_3 = 99,
      SWFDEC_KEY_NUMPAD_4 = 100,
      SWFDEC_KEY_NUMPAD_5 = 101,
      SWFDEC_KEY_NUMPAD_6 = 102,
      SWFDEC_KEY_NUMPAD_7 = 103,
      SWFDEC_KEY_NUMPAD_8 = 104,
      SWFDEC_KEY_NUMPAD_9 = 105,
      SWFDEC_KEY_NUMPAD_MULTIPLY = 106,
      SWFDEC_KEY_NUMPAD_ADD = 107,
      SWFDEC_KEY_NUMPAD_SUBTRACT = 109,
      SWFDEC_KEY_NUMPAD_DECIMAL = 110,
      SWFDEC_KEY_NUMPAD_DIVIDE = 111,
      SWFDEC_KEY_F1 = 112,
      SWFDEC_KEY_F2 = 113,
      SWFDEC_KEY_F3 = 114,
      SWFDEC_KEY_F4 = 115,
      SWFDEC_KEY_F5 = 116,
      SWFDEC_KEY_F6 = 117,
      SWFDEC_KEY_F7 = 118,
      SWFDEC_KEY_F8 = 119,
      SWFDEC_KEY_F9 = 120,
      SWFDEC_KEY_F10 = 121,
      SWFDEC_KEY_F11 = 122,
      SWFDEC_KEY_F12 = 123,
      SWFDEC_KEY_F13 = 124,
      SWFDEC_KEY_F14 = 125,
      SWFDEC_KEY_F15 = 126,
      SWFDEC_KEY_NUM_LOCK = 144,
      SWFDEC_KEY_SEMICOLON = 186,
      SWFDEC_KEY_EQUAL = 187,
      SWFDEC_KEY_MINUS = 189,
      SWFDEC_KEY_SLASH = 191,
      SWFDEC_KEY_GRAVE = 192,
      SWFDEC_KEY_LEFT_BRACKET = 219,
      SWFDEC_KEY_BACKSLASH = 220,
      SWFDEC_KEY_RIGHT_BRACKET = 221,
      SWFDEC_KEY_APOSTROPHE = 222,
    } SwfdecKey;

Lists all known key codes in Swfdec and their meanings on an English keyboard.

`SWFDEC_KEY_BACKSPACE`

  the backspace key

`SWFDEC_KEY_TAB`

  the tab key

`SWFDEC_KEY_CLEAR`

  the clear key

`SWFDEC_KEY_ENTER`

  the enter key

`SWFDEC_KEY_SHIFT`

  the shift key

`SWFDEC_KEY_CONTROL`

  the control key

`SWFDEC_KEY_ALT`

  the alt key

`SWFDEC_KEY_CAPS_LOCK`

  the caps lock key

`SWFDEC_KEY_ESCAPE`

  the escape key

`SWFDEC_KEY_SPACE`

  the space key

`SWFDEC_KEY_PAGE_UP`

  the page up key

`SWFDEC_KEY_PAGE_DOWN`

  the page down key

`SWFDEC_KEY_END`

  the end key

`SWFDEC_KEY_HOME`

  the home key

`SWFDEC_KEY_LEFT`

  the left key

`SWFDEC_KEY_UP`

  the up key

`SWFDEC_KEY_RIGHT`

  the right key

`SWFDEC_KEY_DOWN`

  the down key

`SWFDEC_KEY_INSERT`

  the insert key

`SWFDEC_KEY_DELETE`

  the delete key

`SWFDEC_KEY_HELP`

  the help key

`SWFDEC_KEY_0`

  the 0 key

`SWFDEC_KEY_1`

  the 1 key

`SWFDEC_KEY_2`

  the 2 key

`SWFDEC_KEY_3`

  the 3 key

`SWFDEC_KEY_4`

  the 4 key

`SWFDEC_KEY_5`

  the 5 key

`SWFDEC_KEY_6`

  the 6 key

`SWFDEC_KEY_7`

  the 7 key

`SWFDEC_KEY_8`

  the 8 key

`SWFDEC_KEY_9`

  the 9 key

`SWFDEC_KEY_A`

  the ! key

`SWFDEC_KEY_B`

  the B key

`SWFDEC_KEY_C`

  the C key

`SWFDEC_KEY_D`

  the D key

`SWFDEC_KEY_E`

  the E key

`SWFDEC_KEY_F`

  the F key

`SWFDEC_KEY_G`

  the G key

`SWFDEC_KEY_H`

  the H key

`SWFDEC_KEY_I`

  the I key

`SWFDEC_KEY_J`

  the J key

`SWFDEC_KEY_K`

  the K key

`SWFDEC_KEY_L`

  the L key

`SWFDEC_KEY_M`

  the M key

`SWFDEC_KEY_N`

  the N key

`SWFDEC_KEY_O`

  the O key

`SWFDEC_KEY_P`

  the P key

`SWFDEC_KEY_Q`

  the Q key

`SWFDEC_KEY_R`

  the R key

`SWFDEC_KEY_S`

  the S key

`SWFDEC_KEY_T`

  the T key

`SWFDEC_KEY_U`

  the U key

`SWFDEC_KEY_V`

  the V key

`SWFDEC_KEY_W`

  the W key

`SWFDEC_KEY_X`

  the X key

`SWFDEC_KEY_Y`

  the Y key

`SWFDEC_KEY_Z`

  the Z key

`SWFDEC_KEY_NUMPAD_0`

  the 0 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_1`

  the 1 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_2`

  the 2 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_3`

  the 3 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_4`

  the 4 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_5`

  the 5 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_6`

  the 6 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_7`

  the 7 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_8`

  the 8 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_9`

  the 9 key on the numeric keypad

`SWFDEC_KEY_NUMPAD_MULTIPLY`

  the multiply key on the numeric keypad

`SWFDEC_KEY_NUMPAD_ADD`

  the add key on the numeric keypad

`SWFDEC_KEY_NUMPAD_SUBTRACT`

  the subtract key on the numeric keypad

`SWFDEC_KEY_NUMPAD_DECIMAL`

  the decimal key on the numeric keypad

`SWFDEC_KEY_NUMPAD_DIVIDE`

  the divide key on the numeric keypad

`SWFDEC_KEY_F1`

  the F1 key

`SWFDEC_KEY_F2`

  the F2 key

`SWFDEC_KEY_F3`

  the F3 key

`SWFDEC_KEY_F4`

  the F4 key

`SWFDEC_KEY_F5`

  the F5 key

`SWFDEC_KEY_F6`

  the F6 key

`SWFDEC_KEY_F7`

  the F7 key

`SWFDEC_KEY_F8`

  the F8 key

`SWFDEC_KEY_F9`

  the F9 key

`SWFDEC_KEY_F10`

  the F10 key

`SWFDEC_KEY_F11`

  the F11 key

`SWFDEC_KEY_F12`

  the F12 key

`SWFDEC_KEY_F13`

  the F13 key

`SWFDEC_KEY_F14`

  the F14 key

`SWFDEC_KEY_F15`

  the F15 key

`SWFDEC_KEY_NUM_LOCK`

  the num lock key

`SWFDEC_KEY_SEMICOLON`

  the semicolon key (on English keyboards)

`SWFDEC_KEY_EQUAL`

  the equal key (on English keyboards)

`SWFDEC_KEY_MINUS`

  the minus key (on English keyboards)

`SWFDEC_KEY_SLASH`

  the slash key (on English keyboards)

`SWFDEC_KEY_GRAVE`

  the grave key (on English keyboards)

`SWFDEC_KEY_LEFT_BRACKET`

  the left bracket key (on English keyboards)

`SWFDEC_KEY_BACKSLASH`

  the backslash key (on English keyboards)

`SWFDEC_KEY_RIGHT_BRACKET`

  the right bracket key (on English keyboards)

`SWFDEC_KEY_APOSTROPHE`

  the apostrophe key (on English keyboards)

### enum SwfdecMouseCursor

    typedef enum {
      SWFDEC_MOUSE_CURSOR_NORMAL,
      SWFDEC_MOUSE_CURSOR_NONE,
      SWFDEC_MOUSE_CURSOR_TEXT,
      SWFDEC_MOUSE_CURSOR_CLICK
    } SwfdecMouseCursor;

This enumeration describes the possible types for the SwfdecPlayer::mouse-cursor property.

`SWFDEC_MOUSE_CURSOR_NORMAL`

  a normal mouse cursor

`SWFDEC_MOUSE_CURSOR_NONE`

  no mouse image

`SWFDEC_MOUSE_CURSOR_TEXT`

  a mouse cursor suitable for text editing

`SWFDEC_MOUSE_CURSOR_CLICK`

  a mouse cursor for clicking a hyperlink or a button

### enum SwfdecScaleMode

    typedef enum {
      SWFDEC_SCALE_SHOW_ALL,
      SWFDEC_SCALE_NO_BORDER,
      SWFDEC_SCALE_EXACT_FIT,
      SWFDEC_SCALE_NONE
    } SwfdecScaleMode;

Describes how the movie should be scaled if the given size doesn't equal the movie's size.

`SWFDEC_SCALE_SHOW_ALL`

  Show the whole content as large as possible

`SWFDEC_SCALE_NO_BORDER`

  Fill the whole area, possibly cropping parts

`SWFDEC_SCALE_EXACT_FIT`

  Fill the whole area, don't keep aspect ratio

`SWFDEC_SCALE_NONE`

  Do not scale the movie at all