"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/xitk/control.c" between
xine-ui-0.99.13.tar.bz2 and xine-ui-0.99.14.tar.bz2

About: xine is a free video player which plays mpeg-2 and mpeg-1 video, DVDs (unlocked/unencrypted only), video CDs, SVCDs, and AVI files (using Win32 codecs) with synchronized audio and video, and optionally fullscreen using the Xv extensions in Xfree86 4.x (user interface).

control.c  (xine-ui-0.99.13.tar.bz2):control.c  (xine-ui-0.99.14.tar.bz2)
/* /*
* Copyright (C) 2000-2021 the xine project * Copyright (C) 2000-2022 the xine project
* *
* This file is part of xine, a unix video player. * This file is part of xine, a unix video player.
* *
* xine is free software; you can redistribute it and/or modify * xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* xine is distributed in the hope that it will be useful, * xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 349 skipping to change at line 349
* Create control panel window * Create control panel window
*/ */
static int vctrl_open_window (xui_vctrl_t *vctrl) { static int vctrl_open_window (xui_vctrl_t *vctrl) {
xitk_browser_widget_t br; xitk_browser_widget_t br;
xitk_labelbutton_widget_t lb; xitk_labelbutton_widget_t lb;
xitk_label_widget_t lbl; xitk_label_widget_t lbl;
xitk_widget_t *w; xitk_widget_t *w;
xitk_image_t *bg_image; xitk_image_t *bg_image;
int x, y, width, height; int x, y, width, height;
XITK_WIDGET_INIT (&br);
XITK_WIDGET_INIT (&lb);
{ {
const xitk_skin_element_info_t *info = xitk_skin_get_info (vctrl->gui->skin_ config, "CtlBG"); const xitk_skin_element_info_t *info = xitk_skin_get_info (vctrl->gui->skin_ config, "CtlBG");
bg_image = info ? info->pixmap_img.image : NULL; bg_image = info ? info->pixmap_img.image : NULL;
} }
if (!bg_image) { if (!bg_image) {
gui_msg (vctrl->gui, XUI_MSG_ERROR, _("control: couldn't find image for back ground\n")); gui_msg (vctrl->gui, XUI_MSG_ERROR, _("control: couldn't find image for back ground\n"));
exit(-1); exit(-1);
} }
x = 200; x = 200;
skipping to change at line 376 skipping to change at line 373
vctrl->xwin = xitk_window_create_window_ext (vctrl->gui->xitk, x + 100, y + 10 0, width, height, vctrl->xwin = xitk_window_create_window_ext (vctrl->gui->xitk, x + 100, y + 10 0, width, height,
_("xine Control Window"), NULL, "xine", 0, is_layer_above (vctrl->gui), vctr l->gui->icon, bg_image); _("xine Control Window"), NULL, "xine", 0, is_layer_above (vctrl->gui), vctr l->gui->icon, bg_image);
set_window_type_start(vctrl->gui, vctrl->xwin); set_window_type_start(vctrl->gui, vctrl->xwin);
/* /*
* Widget-list * Widget-list
*/ */
vctrl->widget_list = xitk_window_widget_list(vctrl->xwin); vctrl->widget_list = xitk_window_widget_list(vctrl->xwin);
XITK_WIDGET_INIT (&lbl); lbl.nw.wl = vctrl->widget_list;
lbl.nw.userdata = vctrl;
lbl.callback = NULL; lbl.callback = NULL;
{ {
static const char * const sl_skins[] = { static const char * const sl_skins[] = {
"SliderCtlHue", "SliderCtlSat", "SliderCtlBright", "SliderCtlCont", "SliderCtlHue", "SliderCtlSat", "SliderCtlBright", "SliderCtlCont",
"SliderCtlGamma", "SliderCtlSharp", "SliderCtlNoise" "SliderCtlGamma", "SliderCtlSharp", "SliderCtlNoise"
}; };
static const char * const lbl_skins[] = { static const char * const lbl_skins[] = {
"CtlHueLbl", "CtlSatLbl", "CtlBrightLbl", "CtlContLbl", "CtlHueLbl", "CtlSatLbl", "CtlBrightLbl", "CtlContLbl",
"CtlGammaLbl", "CtlSharpLbl", "CtlNoiseLbl" "CtlGammaLbl", "CtlSharpLbl", "CtlNoiseLbl"
}; };
xitk_slider_widget_t sl; xitk_slider_widget_t sl;
unsigned int u; unsigned int u;
XITK_WIDGET_INIT (&sl); sl.nw.wl = vctrl->widget_list;
sl.min = CONTROL_MIN; sl.min = CONTROL_MIN;
sl.max = CONTROL_MAX; sl.max = CONTROL_MAX;
sl.step = CONTROL_STEP; sl.step = CONTROL_STEP;
sl.callback = control_set_value; sl.callback = control_set_value;
sl.motion_callback = control_set_value; sl.motion_callback = control_set_value;
for (u = 0; u < NUM_SLIDERS; u++) { for (u = 0; u < NUM_SLIDERS; u++) {
vctrl_item_t *item = &vctrl->items[u]; vctrl_item_t *item = &vctrl->items[u];
/* /*
int v; int v;
if (item->enable) if (item->enable)
v = xine_get_param (vctrl->gui->stream, item->prop); v = xine_get_param (vctrl->gui->stream, item->prop);
else else
v = CONTROL_MIN; v = CONTROL_MIN;
*/ */
sl.skin_element_name = sl_skins[u]; sl.nw.skin_element_name = sl_skins[u];
sl.userdata = sl.nw.userdata = item;
sl.motion_userdata = item; item->w = xitk_slider_create (&sl, vctrl->gui->skin_config);
item->w = xitk_slider_create (vctrl->widget_list, vctrl->gui->skin_config,
&sl);
if (item->w) { if (item->w) {
xitk_add_widget (vctrl->widget_list, item->w, (item->enable ? XITK_WIDGE T_STATE_ENABLE : 0) | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (vctrl->widget_list, item->w, (item->enable ? XITK_WIDGE T_STATE_ENABLE : 0) | XITK_WIDGET_STATE_VISIBLE);
xitk_slider_set_pos (item->w, item->value); xitk_slider_set_pos (item->w, item->value);
xitk_set_widget_tips (item->w, item->hint); xitk_set_widget_tips (item->w, item->hint);
} }
lbl.skin_element_name = lbl_skins[u]; lbl.nw.skin_element_name = lbl_skins[u];
lbl.label = item->label; lbl.label = item->label;
xitk_add_widget (vctrl->widget_list, xitk_label_create (vctrl->widget_list xitk_add_widget (vctrl->widget_list, xitk_label_create (&lbl, vctrl->gui->
, vctrl->gui->skin_config, &lbl), skin_config),
XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_STATE_VISIBLE); XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_STATE_VISIBLE);
} }
} }
vctrl->skins_num = skin_get_names (vctrl->gui, vctrl->skins, sizeof (vctrl->sk ins) / sizeof (vctrl->skins[0])); vctrl->skins_num = skin_get_names (vctrl->gui, vctrl->skins, sizeof (vctrl->sk ins) / sizeof (vctrl->skins[0]));
lbl.skin_element_name = "CtlSkLbl"; lbl.nw.skin_element_name = "CtlSkLbl";
/* TRANSLATORS: only ASCII characters (skin) */ /* TRANSLATORS: only ASCII characters (skin) */
lbl.label = pgettext("skin", "Choose a Skin"); lbl.label = pgettext("skin", "Choose a Skin");
xitk_add_widget (vctrl->widget_list, xitk_label_create (vctrl->widget_list, vc trl->gui->skin_config, &lbl), xitk_add_widget (vctrl->widget_list, xitk_label_create (&lbl, vctrl->gui->skin _config),
XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_STATE_VISIBLE); XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_STATE_VISIBLE);
br.nw.wl = vctrl->widget_list;
br.nw.skin_element_name = NULL;
br.nw.userdata = vctrl;
br.arrow_up.skin_element_name = "CtlSkUp"; br.arrow_up.skin_element_name = "CtlSkUp";
br.slider.skin_element_name = "SliderCtlSk"; br.slider.skin_element_name = "SliderCtlSk";
br.arrow_dn.skin_element_name = "CtlSkDn"; br.arrow_dn.skin_element_name = "CtlSkDn";
br.arrow_left.skin_element_name = "CtlSkLeft"; br.arrow_left.skin_element_name = "CtlSkLeft";
br.slider_h.skin_element_name = "SliderHCtlSk"; br.slider_h.skin_element_name = "SliderHCtlSk";
br.arrow_right.skin_element_name = "CtlSkRight"; br.arrow_right.skin_element_name = "CtlSkRight";
br.browser.skin_element_name = "CtlSkItemBtn"; br.browser.skin_element_name = "CtlSkItemBtn";
br.browser.num_entries = vctrl->skins_num; br.browser.num_entries = vctrl->skins_num;
br.browser.entries = vctrl->skins; br.browser.entries = vctrl->skins;
br.callback = br.callback =
br.dbl_click_callback = control_select_new_skin; br.dbl_click_callback = control_select_new_skin;
br.userdata = vctrl; vctrl->skinlist = xitk_browser_create (&br, vctrl->gui->skin_config);
vctrl->skinlist = xitk_browser_create (vctrl->widget_list, vctrl->gui->skin_co
nfig, &br);
xitk_add_widget (vctrl->widget_list, vctrl->skinlist, XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (vctrl->widget_list, vctrl->skinlist, XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_STATE_VISIBLE);
xitk_browser_update_list (vctrl->skinlist, vctrl->skins, NULL, vctrl->skins_nu m, 0); xitk_browser_update_list (vctrl->skinlist, vctrl->skins, NULL, vctrl->skins_nu m, 0);
lb.skin_element_name = "CtlDismiss"; lb.nw.wl = vctrl->widget_list;
lb.button_type = CLICK_BUTTON; lb.nw.skin_element_name = "CtlDismiss";
lb.align = ALIGN_DEFAULT; lb.nw.userdata = vctrl;
lb.label = _("Dismiss"); lb.button_type = CLICK_BUTTON;
lb.callback = _control_toggle_window; lb.align = ALIGN_DEFAULT;
lb.state_callback = NULL; lb.label = _("Dismiss");
lb.userdata = vctrl; lb.callback = _control_toggle_window;
w = xitk_labelbutton_create (vctrl->widget_list, vctrl->gui->skin_config, &lb) lb.state_callback = NULL;
; w = xitk_labelbutton_create (&lb, vctrl->gui->skin_config);
xitk_add_widget (vctrl->widget_list, w, XITK_WIDGET_STATE_ENABLE | XITK_WIDGET _STATE_VISIBLE); xitk_add_widget (vctrl->widget_list, w, XITK_WIDGET_STATE_ENABLE | XITK_WIDGET _STATE_VISIBLE);
xitk_set_widget_tips(w, _("Close control window")); xitk_set_widget_tips(w, _("Close control window"));
vctrl->widget_key = xitk_be_register_event_handler ("control", vctrl->xwin, co ntrol_event, vctrl, NULL, NULL); vctrl->widget_key = xitk_be_register_event_handler ("control", vctrl->xwin, co ntrol_event, vctrl, NULL, NULL);
vctrl->status = 3; vctrl->status = 3;
control_raise_window (vctrl); control_raise_window (vctrl);
xitk_window_set_input_focus (vctrl->xwin); xitk_window_set_input_focus (vctrl->xwin);
return 1; return 1;
 End of changes. 11 change blocks. 
29 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)