1 /***************************************************************** 2 * gmerlin - a general purpose multimedia framework and applications 3 * 4 * Copyright (c) 2001 - 2011 Members of the Gmerlin project 5 * gmerlin-general@lists.sourceforge.net 6 * http://gmerlin.sourceforge.net 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 * *****************************************************************/ 21 22 #include <gmerlin/transcoder_track.h> 23 24 /* Gtk widgets for plugins */ 25 26 typedef struct bg_gtk_plugin_info_s bg_gtk_plugin_info_t; 27 28 void bg_gtk_plugin_info_show(const bg_plugin_info_t * info, 29 GtkWidget * parent); 30 31 /* Browser and configurator for multiple plugins */ 32 33 typedef struct bg_gtk_plugin_widget_multi_s bg_gtk_plugin_widget_multi_t; 34 35 bg_gtk_plugin_widget_multi_t * 36 bg_gtk_plugin_widget_multi_create(bg_plugin_registry_t * reg, 37 uint32_t type_mask, 38 uint32_t flag_mask); 39 40 void bg_gtk_plugin_widget_multi_destroy(bg_gtk_plugin_widget_multi_t * w); 41 42 43 GtkWidget * 44 bg_gtk_plugin_widget_multi_get_widget(bg_gtk_plugin_widget_multi_t * w); 45 46 /* Selector and configurator for a single plugin */ 47 48 typedef struct bg_gtk_plugin_widget_single_s bg_gtk_plugin_widget_single_t; 49 50 bg_gtk_plugin_widget_single_t * 51 bg_gtk_plugin_widget_single_create(char * label, 52 bg_plugin_registry_t * reg, 53 uint32_t type_mask, 54 uint32_t flag_mask); 55 56 void 57 bg_gtk_plugin_widget_single_set_change_callback(bg_gtk_plugin_widget_single_t * w, 58 void (*set_plugin)(const bg_plugin_info_t * plugin, 59 void * data), 60 void * set_plugin_data); 61 62 63 void 64 bg_gtk_plugin_widget_single_set_parameter_callback(bg_gtk_plugin_widget_single_t * w, 65 bg_set_parameter_func_t func, 66 void * priv); 67 68 69 void bg_gtk_plugin_widget_single_destroy(bg_gtk_plugin_widget_single_t * w); 70 71 void bg_gtk_plugin_widget_single_show_buttons(bg_gtk_plugin_widget_single_t * w, 72 int show); 73 74 // GtkWidget * 75 // bg_gtk_plugin_widget_single_get_widget(bg_gtk_plugin_widget_single_t * w); 76 77 void bg_gtk_plugin_widget_single_attach(bg_gtk_plugin_widget_single_t * w, 78 GtkWidget * table, 79 int * row, int * num_columns); 80 81 void bg_gtk_plugin_widget_single_set_sensitive(bg_gtk_plugin_widget_single_t * w, 82 int sensitive); 83 84 const bg_plugin_info_t * 85 bg_gtk_plugin_widget_single_get_plugin(bg_gtk_plugin_widget_single_t * w); 86 87 bg_plugin_handle_t * 88 bg_gtk_plugin_widget_single_load_plugin(bg_gtk_plugin_widget_single_t * w); 89 90 void bg_gtk_plugin_widget_single_set_plugin(bg_gtk_plugin_widget_single_t * w, 91 const bg_plugin_info_t *); 92 93 94 bg_cfg_section_t * 95 bg_gtk_plugin_widget_single_get_section(bg_gtk_plugin_widget_single_t * w); 96 97 bg_cfg_section_t * 98 bg_gtk_plugin_widget_single_get_audio_section(bg_gtk_plugin_widget_single_t * w); 99 100 bg_cfg_section_t * 101 bg_gtk_plugin_widget_single_get_video_section(bg_gtk_plugin_widget_single_t * w); 102 103 bg_cfg_section_t * 104 bg_gtk_plugin_widget_single_get_subtitle_text_section(bg_gtk_plugin_widget_single_t * w); 105 106 bg_cfg_section_t * 107 bg_gtk_plugin_widget_single_get_subtitle_overlay_section(bg_gtk_plugin_widget_single_t * w); 108 109 110 void 111 bg_gtk_plugin_widget_single_set_section(bg_gtk_plugin_widget_single_t * w, 112 bg_cfg_section_t * s, int copy); 113 114 void 115 bg_gtk_plugin_widget_single_set_audio_section(bg_gtk_plugin_widget_single_t * w, 116 bg_cfg_section_t * s, int copy); 117 118 void 119 bg_gtk_plugin_widget_single_set_video_section(bg_gtk_plugin_widget_single_t * w, 120 bg_cfg_section_t * s, int copy); 121 122 void 123 bg_gtk_plugin_widget_single_set_subtitle_text_section(bg_gtk_plugin_widget_single_t * w, 124 bg_cfg_section_t * s, int copy); 125 126 void 127 bg_gtk_plugin_widget_single_set_subtitle_overlay_section(bg_gtk_plugin_widget_single_t * w, 128 bg_cfg_section_t * s, int copy); 129 130 131 132 133 /* Menu for plugins, will be used for file selectors to select the plugin */ 134 135 typedef struct bg_gtk_plugin_menu_s bg_gtk_plugin_menu_t; 136 137 bg_gtk_plugin_menu_t * 138 bg_gtk_plugin_menu_create(int auto_supported, 139 bg_plugin_registry_t * plugin_reg, 140 int type_mask, int flag_mask); 141 142 const char * bg_gtk_plugin_menu_get_plugin(bg_gtk_plugin_menu_t *); 143 GtkWidget * bg_gtk_plugin_menu_get_widget(bg_gtk_plugin_menu_t *); 144 void bg_gtk_plugin_menu_destroy(bg_gtk_plugin_menu_t *); 145 146 void bg_gtk_plugin_menu_set_change_callback(bg_gtk_plugin_menu_t *, 147 void (*callback)(bg_gtk_plugin_menu_t *, void*), 148 void * callback_data); 149 150 void bg_gtk_plugin_menu_attach(bg_gtk_plugin_menu_t * m, GtkWidget * table, 151 int row, 152 int column); 153