"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/xitk/kbindings.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).

kbindings.c  (xine-ui-0.99.13.tar.bz2):kbindings.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 433 skipping to change at line 433
* Return action id from key binding kbt entry. * Return action id from key binding kbt entry.
*/ */
action_id_t kbindings_get_action_id (const kbinding_entry_t *kbt) { action_id_t kbindings_get_action_id (const kbinding_entry_t *kbt) {
if(kbt == NULL) if(kbt == NULL)
return ACTID_NOKEY; return ACTID_NOKEY;
return kbt->action_id; return kbt->action_id;
} }
static int _kbindings_key_is_void (const kbinding_entry_t *kbe) {
const union {
char z[4];
uint32_t v;
} _void = {{'v', 'o', 'i', 'd'}};
uint32_t start;
memcpy (&start, kbe->key, 4);
return (start | 0x20202020) == _void.v;
}
static size_t _kbindings_get_shortcut_from_kbe (const kbinding_entry_t *kbe, cha r *shortcut, size_t shortcut_size, int style) { static size_t _kbindings_get_shortcut_from_kbe (const kbinding_entry_t *kbe, cha r *shortcut, size_t shortcut_size, int style) {
char *q = shortcut, *e = q + shortcut_size; char *q = shortcut, *e = q + shortcut_size;
do { do {
if (!kbe) if (!kbe)
break; break;
if (_kbindings_key_is_void (kbe))
break;
if (q + 1 >= e) if (q + 1 >= e)
break; break;
*q++ = '['; *q++ = '[';
if (style == 0) { if (style == 0) {
if (kbe->modifier & KEYMOD_CONTROL) { if (kbe->modifier & KEYMOD_CONTROL) {
q += strlcpy (q, _("Ctrl"), e - q); q += strlcpy (q, _("Ctrl"), e - q);
if (q + 1 >= e) if (q + 1 >= e)
break; break;
*q++ = '+'; *q++ = '+';
} }
skipping to change at line 519 skipping to change at line 532
} while (0); } while (0);
if (q >= e) if (q >= e)
q = e - 1; q = e - 1;
*q = 0; *q = 0;
return q - shortcut; return q - shortcut;
} }
size_t kbindings_get_shortcut (kbinding_t *kbt, const char *action, char *buf, s ize_t buf_size, int style) { size_t kbindings_get_shortcut (kbinding_t *kbt, const char *action, char *buf, s ize_t buf_size, int style) {
const kbinding_entry_t *k; const kbinding_entry_t *k;
if(kbt) { if (!kbt || !action || !buf || !buf_size)
if(action && (k = kbindings_lookup_action(kbt, action))) { return 0;
if(strcmp(k->key, "VOID")) { if (!(k = kbindings_lookup_action (kbt, action)))
return _kbindings_get_shortcut_from_kbe (k, buf, buf_size, style); return 0;
} return _kbindings_get_shortcut_from_kbe (k, buf, buf_size, style);
}
}
return 0;
} }
/* /*
* Try to find and entry in key binding table matching with key and modifier val ue. * Try to find and entry in key binding table matching with key and modifier val ue.
*/ */
const kbinding_entry_t *kbindings_lookup_binding (kbinding_t *kbt, const char *k ey, int modifier) { const kbinding_entry_t *kbindings_lookup_binding (kbinding_t *kbt, const char *k ey, int modifier) {
kbinding_entry_t *kret = NULL, *k; kbinding_entry_t *kret = NULL, *k;
int i, num_entries; int i, num_entries;
if((key == NULL) || (kbt == NULL)) if((key == NULL) || (kbt == NULL))
skipping to change at line 658 skipping to change at line 668
kbedit->entries = (char **)malloc (2 * kbedit->num_entries * sizeof (kbedit->e ntries[0])); kbedit->entries = (char **)malloc (2 * kbedit->num_entries * sizeof (kbedit->e ntries[0]));
if (!kbedit->entries) if (!kbedit->entries)
return; return;
kbedit->shortcuts = kbedit->entries + kbedit->num_entries; kbedit->shortcuts = kbedit->entries + kbedit->num_entries;
for (i = 0; i < kbedit->num_entries; i++) { for (i = 0; i < kbedit->num_entries; i++) {
/* beware of "Ctrl+Alt+Mod3+Mod4+Mod5+XF86AudioLowerVolume" ;-) */ /* beware of "Ctrl+Alt+Mod3+Mod4+Mod5+XF86AudioLowerVolume" ;-) */
char shortcut[256]; char shortcut[256];
const kbinding_entry_t *entry = _kbindings_get_entry (kbedit->kbt, i); const kbinding_entry_t *entry = _kbindings_get_entry (kbedit->kbt, i);
if (_kbindings_get_shortcut_from_kbe (entry, shortcut, sizeof (shortcut), kb _kbindings_get_shortcut_from_kbe (entry, shortcut, sizeof (shortcut), kbedit
edit->gui->shortcut_style) < 1) ->gui->shortcut_style);
strcpy(shortcut, "[VOID]");
kbedit->entries[i] = _dyn_string_get (&kbedit->ebuf); kbedit->entries[i] = _dyn_string_get (&kbedit->ebuf);
if (entry->is_alias) { if (entry->is_alias) {
_dyn_string_append (&kbedit->ebuf, "@{"); _dyn_string_append (&kbedit->ebuf, "@{");
_dyn_string_append (&kbedit->ebuf, entry->comment); _dyn_string_append (&kbedit->ebuf, entry->comment);
_dyn_string_append (&kbedit->ebuf, "}"); _dyn_string_append (&kbedit->ebuf, "}");
} else { } else {
_dyn_string_append (&kbedit->ebuf, entry->comment); _dyn_string_append (&kbedit->ebuf, entry->comment);
} }
kbedit->shortcuts[i] = _dyn_string_get (&kbedit->ebuf); kbedit->shortcuts[i] = _dyn_string_get (&kbedit->ebuf);
_dyn_string_append (&kbedit->ebuf, shortcut); _dyn_string_append (&kbedit->ebuf, shortcut);
} }
_dyn_string_fix (&kbedit->ebuf, kbedit->entries, 2 * kbedit->num_entries); _dyn_string_fix (&kbedit->ebuf, kbedit->entries, 2 * kbedit->num_entries);
} }
static void kbedit_display_kbinding (xui_keyedit_t *kbedit, const char *action, const kbinding_entry_t *kbe) { static void kbedit_display_kbinding (xui_keyedit_t *kbedit, const char *action, const kbinding_entry_t *kbe) {
if(action && kbe) { if(action && kbe) {
xitk_label_change_label (kbedit->w[_W_comment], action); xitk_label_change_label (kbedit->w[_W_comment], action);
xitk_label_change_label (kbedit->w[_W_key], kbe->key); xitk_label_change_label (kbedit->w[_W_key], _kbindings_key_is_void (kbe) ? _ ("None") : kbe->key);
xitk_button_set_state (kbedit->w[_W_ctrl], (kbe->modifier & KEYMOD_CONTROL) ? 1 : 0); xitk_button_set_state (kbedit->w[_W_ctrl], (kbe->modifier & KEYMOD_CONTROL) ? 1 : 0);
xitk_button_set_state (kbedit->w[_W_meta], (kbe->modifier & KEYMOD_META) ? 1 : 0); xitk_button_set_state (kbedit->w[_W_meta], (kbe->modifier & KEYMOD_META) ? 1 : 0);
xitk_button_set_state (kbedit->w[_W_mod3], (kbe->modifier & KEYMOD_MOD3) ? 1 : 0); xitk_button_set_state (kbedit->w[_W_mod3], (kbe->modifier & KEYMOD_MOD3) ? 1 : 0);
xitk_button_set_state (kbedit->w[_W_mod4], (kbe->modifier & KEYMOD_MOD4) ? 1 : 0); xitk_button_set_state (kbedit->w[_W_mod4], (kbe->modifier & KEYMOD_MOD4) ? 1 : 0);
xitk_button_set_state (kbedit->w[_W_mod5], (kbe->modifier & KEYMOD_MOD5) ? 1 : 0); xitk_button_set_state (kbedit->w[_W_mod5], (kbe->modifier & KEYMOD_MOD5) ? 1 : 0);
} }
} }
/* /*
skipping to change at line 1159 skipping to change at line 1168
y += 45 + 3; y += 45 + 3;
xitk_image_draw_outter_frame (bg, _("Key"), hboldfontname, _XBRD, y, WINDOW_WI DTH - 2 * _XBRD - _XGAP / 2 - _XMODALL, 45); xitk_image_draw_outter_frame (bg, _("Key"), hboldfontname, _XBRD, y, WINDOW_WI DTH - 2 * _XBRD - _XGAP / 2 - _XMODALL, 45);
xitk_image_draw_outter_frame (bg, _("Modifiers"), hboldfontname, WINDOW_WIDTH - _XBRD - _XMODALL, y, _XMODALL, 45); xitk_image_draw_outter_frame (bg, _("Modifiers"), hboldfontname, WINDOW_WIDTH - _XBRD - _XMODALL, y, _XMODALL, 45);
xitk_window_set_background_image (kbedit->xwin, bg); xitk_window_set_background_image (kbedit->xwin, bg);
kbedit_create_browser_entries (kbedit); kbedit_create_browser_entries (kbedit);
y = 34; y = 34;
XITK_WIDGET_INIT(&br); br.nw.wl = kbedit->widget_list;
br.nw.skin_element_name = NULL;
br.nw.userdata = kbedit;
br.arrow_up.skin_element_name = NULL; br.arrow_up.skin_element_name = NULL;
br.slider.skin_element_name = NULL; br.slider.skin_element_name = NULL;
br.arrow_dn.skin_element_name = NULL; br.arrow_dn.skin_element_name = NULL;
br.browser.skin_element_name = NULL; br.browser.skin_element_name = NULL;
br.browser.max_displayed_entries = MAX_DISP_ENTRIES; br.browser.max_displayed_entries = MAX_DISP_ENTRIES;
br.browser.num_entries = kbedit->num_entries; br.browser.num_entries = kbedit->num_entries;
br.browser.entries = (const char* const*)kbedit->entries; br.browser.entries = (const char* const*)kbedit->entries;
br.callback = kbedit_sel; br.callback = kbedit_sel;
br.dbl_click_callback = NULL; br.dbl_click_callback = NULL;
br.userdata = kbedit; kbedit->w[_W_browser] = xitk_noskin_browser_create (&br,
kbedit->w[_W_browser] = xitk_noskin_browser_create (kbedit->widget_list, &br,
_XBRD + 5, y + 5, WINDOW_WIDTH - 2 * (_XBRD + 5), 20, -16, br_fontname); _XBRD + 5, y + 5, WINDOW_WIDTH - 2 * (_XBRD + 5), 20, -16, br_fontname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_browser], XITK_WIDGET_STATE _ENABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_browser], XITK_WIDGET_STATE _ENABLE | XITK_WIDGET_STATE_VISIBLE);
xitk_browser_set_alignment (kbedit->w[_W_browser], ALIGN_LEFT); xitk_browser_set_alignment (kbedit->w[_W_browser], ALIGN_LEFT);
xitk_browser_update_list (kbedit->w[_W_browser], xitk_browser_update_list (kbedit->w[_W_browser],
(const char* const*) kbedit->entries, (const char* const*) kbedit->entries,
(const char* const*) kbedit->shortcuts, kbedit->num_entries, xitk_browser_ge t_current_start (kbedit->w[_W_browser])); (const char* const*) kbedit->shortcuts, kbedit->num_entries, xitk_browser_ge t_current_start (kbedit->w[_W_browser]));
y = y1 - 30 + 4; y = y1 - 30 + 4;
XITK_WIDGET_INIT(&lb); lb.nw.wl = kbedit->widget_list;
lb.userdata = kbedit; lb.nw.skin_element_name = NULL;
lb.skin_element_name = NULL; lb.nw.userdata = kbedit;
lb.align = ALIGN_CENTER; lb.align = ALIGN_CENTER;
x = (WINDOW_WIDTH - 5 * _XGAP / 2 - 6 * _XBTN) / 2; x = (WINDOW_WIDTH - 5 * _XGAP / 2 - 6 * _XBTN) / 2;
lb.button_type = RADIO_BUTTON; lb.button_type = RADIO_BUTTON;
lb.label = _("Alias"); lb.label = _("Alias");
lb.callback = NULL; lb.callback = NULL;
lb.state_callback = kbedit_alias; lb.state_callback = kbedit_alias;
kbedit->w[_W_alias] = xitk_noskin_labelbutton_create (kbedit->widget_list, &lb kbedit->w[_W_alias] = xitk_noskin_labelbutton_create (&lb, x, y, _XBTN, 23,
, x, y, _XBTN, 23,
XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname); XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_alias], XITK_WIDGET_STATE_E NABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_alias], XITK_WIDGET_STATE_E NABLE | XITK_WIDGET_STATE_VISIBLE);
x += _XBTN + _XGAP / 2; x += _XBTN + _XGAP / 2;
lb.button_type = RADIO_BUTTON; lb.button_type = RADIO_BUTTON;
lb.label = _("Edit"); lb.label = _("Edit");
lb.callback = NULL; lb.callback = NULL;
lb.state_callback = kbedit_edit; lb.state_callback = kbedit_edit;
kbedit->w[_W_edit] = xitk_noskin_labelbutton_create (kbedit->widget_list, &lb, kbedit->w[_W_edit] = xitk_noskin_labelbutton_create (&lb, x, y, _XBTN, 23,
x, y, _XBTN, 23,
XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname); XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_edit], XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_edit], XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE);
x += _XBTN + _XGAP / 2; x += _XBTN + _XGAP / 2;
lb.button_type = CLICK_BUTTON; lb.button_type = CLICK_BUTTON;
lb.label = _("Delete"); lb.label = _("Delete");
lb.callback = kbedit_delete; lb.callback = kbedit_delete;
lb.state_callback = NULL; lb.state_callback = NULL;
kbedit->w[_W_delete] = xitk_noskin_labelbutton_create (kbedit->widget_list, &l kbedit->w[_W_delete] = xitk_noskin_labelbutton_create (&lb, x, y, _XBTN, 23,
b, x, y, _XBTN, 23,
XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname); XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_delete], XITK_WIDGET_STATE_ ENABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_delete], XITK_WIDGET_STATE_ ENABLE | XITK_WIDGET_STATE_VISIBLE);
x += _XBTN + _XGAP / 2; x += _XBTN + _XGAP / 2;
lb.button_type = CLICK_BUTTON; lb.button_type = CLICK_BUTTON;
lb.label = _("Save"); lb.label = _("Save");
lb.callback = kbedit_save; lb.callback = kbedit_save;
lb.state_callback = NULL; lb.state_callback = NULL;
kbedit->w[_W_save] = xitk_noskin_labelbutton_create (kbedit->widget_list, &lb, kbedit->w[_W_save] = xitk_noskin_labelbutton_create (&lb, x, y, _XBTN, 23,
x, y, _XBTN, 23,
XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname); XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_save], XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_save], XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE);
x += _XBTN + _XGAP / 2; x += _XBTN + _XGAP / 2;
lb.button_type = CLICK_BUTTON; lb.button_type = CLICK_BUTTON;
lb.label = _("Reset"); lb.label = _("Reset");
lb.callback = kbedit_reset; lb.callback = kbedit_reset;
lb.state_callback = NULL; lb.state_callback = NULL;
kbedit->w[_W_reset] = xitk_noskin_labelbutton_create (kbedit->widget_list, &l kbedit->w[_W_reset] = xitk_noskin_labelbutton_create (&lb, x, y, _XBTN, 23,
b, x, y, _XBTN, 23,
XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname); XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_reset], XITK_WIDGET_STATE_E NABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_reset], XITK_WIDGET_STATE_E NABLE | XITK_WIDGET_STATE_VISIBLE);
x += _XBTN + _XGAP / 2; x += _XBTN + _XGAP / 2;
lb.button_type = CLICK_BUTTON; lb.button_type = CLICK_BUTTON;
lb.label = _("Done"); lb.label = _("Done");
lb.callback = kbedit_exit; lb.callback = kbedit_exit;
lb.state_callback = NULL; lb.state_callback = NULL;
kbedit->w[_W_done] = xitk_noskin_labelbutton_create (kbedit->widget_list, &lb, kbedit->w[_W_done] = xitk_noskin_labelbutton_create (&lb, x, y, _XBTN, 23,
x, y, _XBTN, 23,
XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname); XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_done], XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_done], XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE);
fs = xitk_font_load_font(gui->xitk, hboldfontname); fs = xitk_font_load_font(gui->xitk, hboldfontname);
fontheight = xitk_font_get_string_height(fs, " "); fontheight = xitk_font_get_string_height(fs, " ");
xitk_font_unload_font(fs); xitk_font_unload_font(fs);
y = y1 + (45 / 2); /* Checkbox */ y = y1 + (45 / 2); /* Checkbox */
y1 = y - ((fontheight - 10) / 2); /* Text, v-centered to ckeckbox */ y1 = y - ((fontheight - 10) / 2); /* Text, v-centered to ckeckbox */
XITK_WIDGET_INIT (&l); l.nw.wl = kbedit->widget_list;
l.skin_element_name = NULL; l.nw.skin_element_name = NULL;
l.callback = NULL; l.nw.userdata = kbedit;
l.callback = NULL;
l.label = "Binding Action"; l.label = "Binding Action";
kbedit->w[_W_comment] = xitk_noskin_label_create (kbedit->widget_list, &l, _XB kbedit->w[_W_comment] = xitk_noskin_label_create (&l, _XBRD + _FRAMEWIDTH + _X
RD + _FRAMEWIDTH + _XGAP, y1, GAP, y1,
WINDOW_WIDTH - 2 * (_XBRD + _FRAMEWIDTH + _XGAP), fontheight, hboldfontname) ; WINDOW_WIDTH - 2 * (_XBRD + _FRAMEWIDTH + _XGAP), fontheight, hboldfontname) ;
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_comment], XITK_WIDGET_STATE _ENABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_comment], XITK_WIDGET_STATE _ENABLE | XITK_WIDGET_STATE_VISIBLE);
y += 45 + 3; y += 45 + 3;
y1 += 45 + 3; y1 += 45 + 3;
l.label = "THE Key"; l.label = "THE Key";
kbedit->w[_W_key] = xitk_noskin_label_create (kbedit->widget_list, &l, _XBRD + kbedit->w[_W_key] = xitk_noskin_label_create (&l, _XBRD + _FRAMEWIDTH + _XGAP,
_FRAMEWIDTH + _XGAP, y1, y1,
WINDOW_WIDTH - 2 * (_XBRD + _FRAMEWIDTH + _XGAP) - _XMODALL - _XGAP / 2, fon theight, hboldfontname); WINDOW_WIDTH - 2 * (_XBRD + _FRAMEWIDTH + _XGAP) - _XMODALL - _XGAP / 2, fon theight, hboldfontname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_key], XITK_WIDGET_STATE_ENA BLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_key], XITK_WIDGET_STATE_ENA BLE | XITK_WIDGET_STATE_VISIBLE);
{ {
static const char s[5][8] = { N_("ctrl"), N_("meta"), N_("mod3"), N_("mod4") , N_("mod5") }; static const char s[5][8] = { N_("ctrl"), N_("meta"), N_("mod3"), N_("mod4") , N_("mod5") };
xitk_button_widget_t b; xitk_button_widget_t b;
uint32_t i; uint32_t i;
XITK_WIDGET_INIT (&b); b.nw.wl = kbedit->widget_list;
b.callback = NULL; b.nw.skin_element_name = "XITK_NOSKIN_CHECK";
b.state_callback = kbedit_dummy; b.nw.userdata = kbedit;
b.userdata = NULL; b.callback = NULL;
b.skin_element_name = "XITK_NOSKIN_CHECK"; b.state_callback = kbedit_dummy;
x = WINDOW_WIDTH - _XBRD - _XMODALL + _FRAMEWIDTH + _XGAP; x = WINDOW_WIDTH - _XBRD - _XMODALL + _FRAMEWIDTH + _XGAP;
for (i = 0; i < sizeof (s) / sizeof (s[0]); i++) { for (i = 0; i < sizeof (s) / sizeof (s[0]); i++) {
xitk_widget_t *w; xitk_widget_t *w;
kbedit->w[_W_ctrl + i] = w = xitk_noskin_button_create (kbedit->widget_lis t, &b, x, y, _CSIZE, _CSIZE); kbedit->w[_W_ctrl + i] = w = xitk_noskin_button_create (&b, x, y, _CSIZE, _CSIZE);
xitk_add_widget (kbedit->widget_list, w, XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, w, XITK_WIDGET_STATE_VISIBLE);
x += _CSIZE + _XGAP; x += _CSIZE + _XGAP;
l.label = gettext (s[i]); l.label = gettext (s[i]);
w = xitk_noskin_label_create (kbedit->widget_list, &l, x, y1, _XMODTEXT, fontheight, hboldfontname); w = xitk_noskin_label_create (&l, x, y1, _XMODTEXT, fontheight, hboldfont name);
xitk_add_widget (kbedit->widget_list, w, XITK_WIDGET_STATE_ENABLE | XITK_W IDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, w, XITK_WIDGET_STATE_ENABLE | XITK_W IDGET_STATE_VISIBLE);
x += _XMODTEXT + _XGAP; x += _XMODTEXT + _XGAP;
} }
} }
y = WINDOW_HEIGHT - (23 + 15); y = WINDOW_HEIGHT - (23 + 15);
lb.button_type = RADIO_BUTTON; lb.button_type = RADIO_BUTTON;
lb.label = _("Grab"); lb.label = _("Grab");
lb.callback = NULL; lb.callback = NULL;
lb.state_callback = kbedit_grab; lb.state_callback = kbedit_grab;
kbedit->w[_W_grab] = xitk_noskin_labelbutton_create (kbedit->widget_list, &lb, kbedit->w[_W_grab] = xitk_noskin_labelbutton_create (&lb, _XBRD, y, WINDOW_WID
_XBRD, y, WINDOW_WIDTH - 2 * _XBRD, 23, TH - 2 * _XBRD, 23,
XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname); XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_INV, hboldfon tname);
xitk_add_widget (kbedit->widget_list, kbedit->w[_W_grab], XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (kbedit->widget_list, kbedit->w[_W_grab], XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE);
kbedit_unset (kbedit); kbedit_unset (kbedit);
kbedit->kreg = xitk_be_register_event_handler ("kbedit", kbedit->xwin, kbedit_ event, kbedit, NULL, NULL); kbedit->kreg = xitk_be_register_event_handler ("kbedit", kbedit->xwin, kbedit_ event, kbedit, NULL, NULL);
kbedit->kbr.key = 0; kbedit->kbr.key = 0;
kbedit->kbr.entry.key = NULL; kbedit->kbr.entry.key = NULL;
kbedit->kbr.xwin = NULL; kbedit->kbr.xwin = NULL;
 End of changes. 22 change blocks. 
78 lines changed or deleted 83 lines changed or added

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