|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* This file is part of libbluray
|
|
Packit |
5e46da |
* Copyright (C) 2013 Petri Hintukainen <phintuka@users.sourceforge.net>
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This library is free software; you can redistribute it and/or
|
|
Packit |
5e46da |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
5e46da |
* License as published by the Free Software Foundation; either
|
|
Packit |
5e46da |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
5e46da |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
5e46da |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
5e46da |
* Lesser General Public License for more details.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
5e46da |
* License along with this library. If not, see
|
|
Packit |
5e46da |
* <http://www.gnu.org/licenses/>.
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#if !defined(_BD_TEXTST_H_)
|
|
Packit |
5e46da |
#define _BD_TEXTST_H_
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include "pg.h"
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include <stdint.h>
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#define BD_TEXTST_FLOW_LEFT_RIGHT 1 /* Left-to-Right character progression, Top-to-Bottom line progression */
|
|
Packit |
5e46da |
#define BD_TEXTST_FLOW_RIGHT_LEFT 2 /* Right-to-Left character progression, Top-to-Bottom line progression */
|
|
Packit |
5e46da |
#define BD_TEXTST_FLOW_TOP_BOTTOM 3 /* Top-to-Bottom character progression, Right-to-Left line progression */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#define BD_TEXTST_HALIGN_LEFT 1
|
|
Packit |
5e46da |
#define BD_TEXTST_HALIGN_CENTER 2
|
|
Packit |
5e46da |
#define BD_TEXTST_HALIGN_RIGHT 3
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#define BD_TEXTST_VALIGN_TOP 1
|
|
Packit |
5e46da |
#define BD_TEXTST_VALIGN_MIDDLE 2
|
|
Packit |
5e46da |
#define BD_TEXTST_VALIGN_BOTTOM 3
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#define BD_TEXTST_FONT_OUTLINE_THIN 1
|
|
Packit |
5e46da |
#define BD_TEXTST_FONT_OUTLINE_MEDIUM 2
|
|
Packit |
5e46da |
#define BD_TEXTST_FONT_OUTLINE_THICK 3
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#define BD_TEXTST_DATA_STRING 1
|
|
Packit |
5e46da |
#define BD_TEXTST_DATA_FONT_ID 2
|
|
Packit |
5e46da |
#define BD_TEXTST_DATA_FONT_STYLE 3
|
|
Packit |
5e46da |
#define BD_TEXTST_DATA_FONT_SIZE 4
|
|
Packit |
5e46da |
#define BD_TEXTST_DATA_FONT_COLOR 5
|
|
Packit |
5e46da |
#define BD_TEXTST_DATA_NEWLINE 0x0a
|
|
Packit |
5e46da |
#define BD_TEXTST_DATA_RESET_STYLE 0x0b
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint16_t xpos;
|
|
Packit |
5e46da |
uint16_t ypos;
|
|
Packit |
5e46da |
uint16_t width;
|
|
Packit |
5e46da |
uint16_t height;
|
|
Packit |
5e46da |
} BD_TEXTST_RECT;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
BD_TEXTST_RECT region;
|
|
Packit |
5e46da |
uint8_t background_color; /* palette entry id ref */
|
|
Packit |
5e46da |
} BD_TEXTST_REGION_INFO;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t bold : 1;
|
|
Packit |
5e46da |
uint8_t italic : 1;
|
|
Packit |
5e46da |
uint8_t outline_border : 1;
|
|
Packit |
5e46da |
} BD_TEXTST_FONT_STYLE;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t region_style_id;
|
|
Packit |
5e46da |
BD_TEXTST_REGION_INFO region_info;
|
|
Packit |
5e46da |
BD_TEXTST_RECT text_box; /* relative to region */
|
|
Packit |
5e46da |
uint8_t text_flow; /* BD_TEXTST_FLOW_* */
|
|
Packit |
5e46da |
uint8_t text_halign; /* BD_TEXTST_HALIGN_* */
|
|
Packit |
5e46da |
uint8_t text_valign; /* BD_TEXTST_VALIGN_* */
|
|
Packit |
5e46da |
uint8_t line_space;
|
|
Packit |
5e46da |
uint8_t font_id_ref;
|
|
Packit |
5e46da |
BD_TEXTST_FONT_STYLE font_style;
|
|
Packit |
5e46da |
uint8_t font_size;
|
|
Packit |
5e46da |
uint8_t font_color; /* palette entry id ref */
|
|
Packit |
5e46da |
uint8_t outline_color; /* palette entry id ref */
|
|
Packit |
5e46da |
uint8_t outline_thickness; /* BD_TEXTST_FONT_OUTLINE_* */
|
|
Packit |
5e46da |
} BD_TEXTST_REGION_STYLE;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t user_style_id;
|
|
Packit |
5e46da |
int16_t region_hpos_delta;
|
|
Packit |
5e46da |
int16_t region_vpos_delta;
|
|
Packit |
5e46da |
int16_t text_box_hpos_delta;
|
|
Packit |
5e46da |
int16_t text_box_vpos_delta;
|
|
Packit |
5e46da |
int16_t text_box_width_delta;
|
|
Packit |
5e46da |
int16_t text_box_height_delta;
|
|
Packit |
5e46da |
int8_t font_size_delta;
|
|
Packit |
5e46da |
int8_t line_space_delta;
|
|
Packit |
5e46da |
} BD_TEXTST_USER_STYLE;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t type; /* BD_TEXTST_DATA_* */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
union {
|
|
Packit |
5e46da |
uint8_t font_id_ref;
|
|
Packit |
5e46da |
uint8_t font_size;
|
|
Packit |
5e46da |
uint8_t font_color;
|
|
Packit |
5e46da |
struct {
|
|
Packit |
5e46da |
BD_TEXTST_FONT_STYLE style;
|
|
Packit |
5e46da |
uint8_t outline_color;
|
|
Packit |
5e46da |
uint8_t outline_thickness;
|
|
Packit |
5e46da |
} style;
|
|
Packit |
5e46da |
struct {
|
|
Packit |
5e46da |
uint8_t length;
|
|
Packit |
5e46da |
uint8_t string[1];
|
|
Packit |
5e46da |
} text;
|
|
Packit |
5e46da |
} data;
|
|
Packit |
5e46da |
} BD_TEXTST_DATA;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t continous_present_flag;
|
|
Packit |
5e46da |
uint8_t forced_on_flag;
|
|
Packit |
5e46da |
uint8_t region_style_id_ref;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
unsigned elem_count;
|
|
Packit |
5e46da |
BD_TEXTST_DATA *elem; /* note: variable-sized elements */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
unsigned line_count;
|
|
Packit |
5e46da |
} BD_TEXTST_DIALOG_REGION;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* segments
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t player_style_flag;
|
|
Packit |
5e46da |
uint8_t region_style_count;
|
|
Packit |
5e46da |
uint8_t user_style_count;
|
|
Packit |
5e46da |
BD_TEXTST_REGION_STYLE *region_style;
|
|
Packit |
5e46da |
BD_TEXTST_USER_STYLE *user_style;
|
|
Packit |
5e46da |
BD_PG_PALETTE_ENTRY palette[256];
|
|
Packit |
5e46da |
} BD_TEXTST_DIALOG_STYLE;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
int64_t start_pts;
|
|
Packit |
5e46da |
int64_t end_pts;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BD_PG_PALETTE_ENTRY *palette_update;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint8_t region_count;
|
|
Packit |
5e46da |
BD_TEXTST_DIALOG_REGION region[2];
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
} BD_TEXTST_DIALOG_PRESENTATION;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#endif // _BD_TEXTST_H_
|