Changeset 1158
- Timestamp:
- 02/28/07 09:20:02 (6 years ago)
- Location:
- trunk/src/target/OM-2007/applications/openmoko-keyboard
- Files:
-
- 8 edited
-
layouts/keyboard.xml (modified) (4 diffs)
-
src/config-parser.c (modified) (5 diffs)
-
src/matchbox-keyboard-key.c (modified) (2 diffs)
-
src/matchbox-keyboard-layout.c (modified) (2 diffs)
-
src/matchbox-keyboard-ui-xft-backend.c (modified) (5 diffs)
-
src/matchbox-keyboard-ui.c (modified) (9 diffs)
-
src/matchbox-keyboard.c (modified) (1 diff)
-
src/matchbox-keyboard.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007/applications/openmoko-keyboard/layouts/keyboard.xml
r542 r1158 1 <?xml version="1.0" encoding="UTF-8"?>1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <keyboard> 3 3 … … 7 7 8 8 <layout id="defualt keyboard"> 9 10 <!-- 11 <row> 12 <key> 13 <default display="ã" /> 14 </key> 15 <key> 16 <default display="Óª" /> 17 </key> 18 <key width="1500"> 19 <default display="Ω" /> 20 </key> 21 <space width="1500" /> 22 <key fill="true"> 23 <default display="â ¿" /> 24 </key> 25 </row> 26 --> 9 <background image="bg_keypad.png" /> 27 10 28 11 <row> 29 12 30 <space width="500" extended="true"/>31 32 <key fill="true">33 <default display="Esc" action="escape" />34 <background image="testkey.png"/>35 </key>36 <!--37 13 <key> 38 <default display="image:/usr/share/pixmaps/sync_icon.png" action="a"/> 39 </key> 40 --> 41 <key> 42 <default display="`" /> 43 <background image="testkey.png"/> 14 <default display="Q" /> 15 <normalimage image="key_cap_Q.png"/> 16 <pushimage image="key_cap_Q_p.png"/> 44 17 </key> 45 18 <key> 46 <default display="1" /> 47 <shifted display="!"/>48 <background image="testkey.png"/>19 <default display="W" /> 20 <normalimage image="key_cap_W.png"/> 21 <pushimage image="key_cap_W_p.png"/> 49 22 </key> 50 23 <key> 51 <default display="2" /> 52 <shifted display='"' /> 53 <mod1 display="œ" /> 54 <background image="testkey.png"/> 24 <default display="E" /> 25 <normalimage image="key_cap_E.png"/> 26 <pushimage image="key_cap_E_p.png"/> 55 27 </key> 56 28 <key> 57 <default display="3" /> 58 <shifted display="£" /> 59 <mod1 display="Ÿ" /> 60 <background image="testkey.png"/> 29 <default display="R" /> 30 <normalimage image="key_cap_R.png"/> 31 <pushimage image="key_cap_R_p.png"/> 61 32 </key> 62 33 <key> 63 <default display="4" />64 <shifted display="$" /> 65 <background image="testkey.png"/>34 <default display="T" /> 35 <normalimage image="key_cap_T.png"/> 36 <pushimage image="key_cap_T_p.png"/> 66 37 </key> 67 38 <key> 68 <default display="5" />69 <shifted display="%" /> 70 <background image="testkey.png"/>39 <default display="Y" /> 40 <normalimage image="key_cap_Y.png"/> 41 <pushimage image="key_cap_Y_p.png"/> 71 42 </key> 72 43 <key> 73 <default display="6" />74 <shifted display="^" /> 75 <background image="testkey.png"/>44 <default display="U" /> 45 <normalimage image="key_cap_U.png"/> 46 <pushimage image="key_cap_U_p.png"/> 76 47 </key> 77 48 <key> 78 <default display="7" />79 <shifted display="&" /> 80 <background image="testkey.png"/>49 <default display="I" /> 50 <normalimage image="key_cap_I.png"/> 51 <pushimage image="key_cap_I_p.png"/> 81 52 </key> 82 53 <key> 83 <default display="8" />84 <shifted display="*" /> 85 <background image="testkey.png"/>54 <default display="O" /> 55 <normalimage image="key_cap_O.png"/> 56 <pushimage image="key_cap_O_p.png"/> 86 57 </key> 87 58 <key> 88 <default display="9" /> 89 <shifted display="(" /> 90 <background image="testkey.png"/> 91 </key> 92 <key> 93 <default display="0" /> 94 <shifted display=")" /> 95 <background image="testkey.png"/> 96 </key> 97 <key> 98 <default display="-" /> 99 <shifted display="_" /> 100 <background image="testkey.png"/> 101 </key> 102 <key> 103 <default display="=" /> 104 <shifted display="+" /> 105 <background image="testkey.png"/> 106 </key> 107 108 <key fill="true"> 109 <default display="Bksp" action="backspace"/> 59 <default display="P" /> 60 <normalimage image="key_cap_P.png"/> 61 <pushimage image="key_cap_P_p.png"/> 110 62 </key> 111 63 … … 114 66 <row> 115 67 116 <space width="500" extended="true"/> 117 118 <key fill="true"> 119 <default display="Tab" action="tab"/> 120 </key> 121 <key obey-caps='true'> 122 <default display="q" /> 123 <shifted display="Q" /> 124 <background image="testkey.png"/> 125 </key> 126 <key obey-caps='true'> 127 <default display="w" /> 128 <shifted display="W" /> 129 <background image="testkey.png"/> 130 </key> 131 <key obey-caps='true'> 132 <mod1 display="ë" /> 133 <default display="e" /> 134 <shifted display="E" /> 135 <background image="testkey.png"/> 136 </key> 137 <key obey-caps='true'> 138 <default display="r" /> 139 <shifted display="R" /> 140 <background image="testkey.png"/> 141 </key> 142 <key obey-caps='true'> 143 <default display="t" /> 144 <shifted display="T" /> 145 <background image="testkey.png"/> 146 </key> 147 <key obey-caps='true'> 148 <default display="y" /> 149 <shifted display="Y" /> 150 <background image="testkey.png"/> 151 </key> 152 <key obey-caps='true'> 153 <default display="u" /> 154 <shifted display="U" /> 155 <background image="testkey.png"/> 156 </key> 157 <key obey-caps='true'> 158 <default display="i" /> 159 <shifted display="I" /> 160 <background image="testkey.png"/> 161 </key> 162 <key obey-caps='true'> 163 <default display="o" /> 164 <shifted display="O" /> 165 <background image="testkey.png"/> 166 </key> 167 <key obey-caps='true'> 168 <default display="p" /> 169 <shifted display="P" /> 170 <background image="testkey.png"/> 68 <key> 69 <default display="A" /> 70 <normalimage image="key_cap_A.png"/> 71 <pushimage image="key_cap_A_p.png"/> 171 72 </key> 172 73 <key> 173 <default display="{" /> 174 <shifted display="["/>175 <background image="testkey.png"/>74 <default display="S" /> 75 <normalimage image="key_cap_S.png"/> 76 <pushimage image="key_cap_S_p.png"/> 176 77 </key> 177 78 <key> 178 <default display="}" /> 179 <shifted display="]"/>180 <background image="testkey.png"/>79 <default display="D" /> 80 <normalimage image="key_cap_D.png"/> 81 <pushimage image="key_cap_D_p.png"/> 181 82 </key> 182 <key fill="true"> 183 <default display="\" /> 184 <shifted display="|" /> 185 <background image="testkey.png"/> 83 <key> 84 <default display="F" /> 85 <normalimage image="key_cap_F.png"/> 86 <pushimage image="key_cap_F_p.png"/> 87 </key> 88 <key> 89 <default display="G" /> 90 <normalimage image="key_cap_G.png"/> 91 <pushimage image="key_cap_G_p.png"/> 92 </key> 93 <key> 94 <default display="H" /> 95 <normalimage image="key_cap_H.png"/> 96 <pushimage image="key_cap_H_p.png"/> 97 </key> 98 <key> 99 <default display="J" /> 100 <normalimage image="key_cap_J.png"/> 101 <pushimage image="key_cap_J_p.png"/> 102 </key> 103 <key> 104 <default display="K" /> 105 <normalimage image="key_cap_K.png"/> 106 <pushimage image="key_cap_K_p.png"/> 107 </key> 108 <key> 109 <default display="L" /> 110 <normalimage image="key_cap_L.png"/> 111 <pushimage image="key_cap_L_p.png"/> 186 112 </key> 187 113 … … 189 115 <row> 190 116 191 <space width="500" extended="true"/> 192 193 <key fill="true"> 194 <default display="Caps" action="modifier:caps"/> 195 </key> 196 <key obey-caps='true'> 197 <default display="a" /> 198 <shifted display="A" /> 199 <background image="testkey.png"/> 200 </key> 201 <key obey-caps='true'> 202 <default display="s" /> 203 <shifted display="S" /> 204 <background image="testkey.png"/> 205 </key> 206 <key obey-caps='true'> 207 <default display="d" /> 208 <shifted display="D" /> 209 <background image="testkey.png"/> 210 </key> 211 <key obey-caps='true'> 212 <default display="f" /> 213 <shifted display="F" /> 214 <background image="testkey.png"/> 215 </key> 216 <key obey-caps='true'> 217 <default display="g" /> 218 <shifted display="G" /> 219 <background image="testkey.png"/> 220 </key> 221 <key obey-caps='true'> 222 <default display="h" /> 223 <shifted display="H" /> 224 <background image="testkey.png"/> 225 </key> 226 <key obey-caps='true'> 227 <default display="j" /> 228 <shifted display="J" /> 229 <background image="testkey.png"/> 230 </key> 231 <key obey-caps='true'> 232 <default display="k" /> 233 <shifted display="K" /> 234 <background image="testkey.png"/> 235 </key> 236 <key obey-caps='true'> 237 <default display="l" /> 238 <shifted display="L" /> 239 <background image="testkey.png"/> 117 <key> 118 <default display="Z" /> 119 <normalimage image="key_cap_Z.png"/> 120 <pushimage image="key_cap_Z_p.png"/> 240 121 </key> 241 122 <key> 242 <default display=";" /> 243 <shifted display=":"/>244 <background image="testkey.png"/>123 <default display="X" /> 124 <normalimage image="key_cap_X.png"/> 125 <pushimage image="key_cap_X_p.png"/> 245 126 </key> 246 127 <key> 247 <default display="#" /> 248 <shifted display="~"/>249 <background image="testkey.png"/>128 <default display="C" /> 129 <normalimage image="key_cap_C.png"/> 130 <pushimage image="key_cap_C_p.png"/> 250 131 </key> 251 <key fill="true"> 252 <default display="Ret" action="return"/> 132 <key> 133 <default display="V" /> 134 <normalimage image="key_cap_V.png"/> 135 <pushimage image="key_cap_V_p.png"/> 136 </key> 137 <key> 138 <default display="B" /> 139 <normalimage image="key_cap_B.png"/> 140 <pushimage image="key_cap_B_p.png"/> 141 </key> 142 <key> 143 <default display="N" /> 144 <normalimage image="key_cap_N.png"/> 145 <pushimage image="key_cap_N_p.png"/> 146 </key> 147 <key> 148 <default display="M" /> 149 <normalimage image="key_cap_M.png"/> 150 <pushimage image="key_cap_M_p.png"/> 253 151 </key> 254 152 255 153 </row> 154 256 155 <row> 257 258 <space width="500" extended="true"/>259 260 <key fill="true">261 <default display="Shift" action="modifier:shift"/>262 </key>263 264 <key obey-caps='true'>265 <default display="z" />266 <shifted display="Z" />267 <background image="testkey.png"/>268 </key>269 270 <key obey-caps='true'>271 <default display="x" />272 <shifted display="X" />273 <background image="testkey.png"/>274 </key>275 276 <key obey-caps='true'>277 <default display="c" />278 <shifted display="C" />279 <background image="testkey.png"/>280 </key>281 282 <key obey-caps='true'>283 <default display="v" />284 <shifted display="V" />285 <background image="testkey.png"/>286 </key>287 288 <key obey-caps='true'>289 <default display="b" />290 <shifted display="B" />291 <background image="testkey.png"/>292 </key>293 294 <key obey-caps='true'>295 <default display="n" />296 <shifted display="N" />297 <background image="testkey.png"/>298 </key>299 300 <key obey-caps='true'>301 <default display="m" />302 <shifted display="M" />303 <background image="testkey.png"/>304 </key>305 306 <key>307 <default display="," />308 <shifted display="<" />309 <background image="testkey.png"/>310 </key>311 <key>312 <default display="." />313 <shifted display=">" />314 <background image="testkey.png"/>315 </key>316 <key>317 <default display="/" />318 <shifted display="?" />319 <background image="testkey.png"/>320 </key>321 322 323 <key fill="true">324 <default display="Shift" action="modifier:shift"/>325 </key>326 327 </row>328 <row>329 330 <space width="500" extended="true"/>331 332 <key>333 <default display="Àëö" action="modifier:mod1"/>334 </key>335 336 <key fill="true">337 <default display="Ctrl" action="modifier:ctrl"/>338 </key>339 340 <key>341 <default display="Alt" action="modifier:alt"/>342 </key>343 156 344 157 345 158 <key> 346 <default display=" " action="space" /> 347 <background image="spacekey.png"/> 348 </key> 349 350 <key> 351 <default display="@" /> 352 <shifted display="'" /> 353 </key> 354 355 <key> 356 <default display="^" action="up" /> 159 <default display=" " action="space" /> 160 <normalimage image="key_comm_space.png"/> 161 <pushimage image="key_comm_space_p.png"/> 357 162 </key> 358 163 <key> 359 <default display="V" action="down" /> 164 <default display=" " action="backspace" /> 165 <normalimage image="key_comm_backspace.png"/> 166 <pushimage image="key_comm_backspace_p.png"/> 360 167 </key> 361 168 <key> 362 <default display="<" action="left" /> 169 <default display=" " action="return" /> 170 <normalimage image="key_comm_enter.png"/> 171 <pushimage image="key_comm_enter_p.png"/> 363 172 </key> 364 <key> 365 <default display=">" action="right" /> 366 </key> 367 368 </row> 173 </row> 369 174 370 175 </layout> -
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/config-parser.c
r530 r1158 316 316 const char *val; 317 317 char buf[512]; 318 Bool pushimage; 319 320 if (streq(tag, "normalimage")) 321 { 322 pushimage = False; 323 } 324 else if (streq(tag, "pushimage")) 325 { 326 pushimage = True; 327 } 328 else 329 { 330 set_error(state, "Unknown background image"); 331 return; 332 } 318 333 319 334 if ((val = attr_get_val("image", attr)) == NULL) 320 335 { 321 fprintf(stderr, "image=%s\n", val);322 336 set_error(state, "Attribute 'image' is required"); 323 337 return; … … 340 354 fprintf(stderr, "load img fail\n"); 341 355 342 mb_kbd_key_set_back_image(state->current_key, img); 356 if (pushimage) 357 mb_kbd_key_set_normal_image(state->current_key, img); 358 else 359 mb_kbd_key_set_push_image(state->current_key, img); 343 360 } 344 361 … … 557 574 } 558 575 559 /*FIXME: It is only temporary code */560 //img = mb_kbd_image_new(state->keyboard, "/root/.matchbox/match.png");561 //if(!img)562 //fprintf(stderr, "can not find /root/.matchbox/match.png\n");563 //mb_kbd_key_set_back_image(state->current_key, img);564 565 576 mb_kbd_row_append_key(state->current_row, state->current_key); 577 } 578 579 static void 580 config_handle_layout_background(MBKeyboardConfigState *state, 581 const char **attr) 582 { 583 MBKeyboardImage *img; 584 const char *val; 585 char buf[512]; 586 587 if ((val = attr_get_val("image", attr)) == NULL) 588 { 589 set_error(state, "Backgroud Attribute 'image' is required"); 590 return; 591 } 592 593 if (val[0] != '/') 594 { 595 snprintf(buf, 512, "%s/%s", PKGDATADIR, val); 596 597 if (!util_file_readable(buf)) 598 snprintf(buf, 512, "%s/.matchbox/%s", getenv("HOME"), val); 599 600 img = mb_kbd_image_new (state->keyboard, buf); 601 } 602 else 603 { 604 img = mb_kbd_image_new (state->keyboard, val); 605 } 606 607 if (img == NULL) 608 fprintf(stderr, "load img fail\n"); 609 610 mb_kbd_layout_set_background(state->current_layout, img); 611 566 612 } 567 613 … … 588 634 mb_kbd_key_set_blank(state->current_key, True); 589 635 } 590 else if (streq(tag, "background")) 636 else if (streq(tag, "normalimage") 637 || streq(tag, "pushimage")) 591 638 { 592 639 config_handle_key_background_tag(state, tag, attr); … … 600 647 { 601 648 config_handle_key_subtag(state, tag, attr); 649 } 650 else if (streq(tag, "background")) 651 { 652 config_handle_layout_background(state, attr); 602 653 } 603 654 -
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard-key.c
r530 r1158 73 73 boolean extended; /* only show in landscape */ 74 74 75 MBKeyboardImage *back_image; /* The background image */ 75 MBKeyboardImage *normal_image; /* The normal image */ 76 MBKeyboardImage *push_image; /* The push down image */ 76 77 77 78 MBKeyboardStateType sets_kbdstate; /* needed */ … … 101 102 102 103 void 103 mb_kbd_key_set_ back_image(MBKeyboardKey *key, MBKeyboardImage *image)104 { 105 key-> back_image = image;104 mb_kbd_key_set_normal_image(MBKeyboardKey *key, MBKeyboardImage *image) 105 { 106 key->normal_image = image; 106 107 } 107 108 108 109 MBKeyboardImage * 109 mb_kbd_key_get_back_image(MBKeyboardKey *key) 110 { 111 return key->back_image; 110 mb_kbd_key_get_normal_image(MBKeyboardKey *key) 111 { 112 return key->normal_image; 113 } 114 115 void 116 mb_kbd_key_set_push_image(MBKeyboardKey *key, MBKeyboardImage *image) 117 { 118 key->push_image = image; 119 } 120 121 MBKeyboardImage * 122 mb_kbd_key_get_push_image(MBKeyboardKey *key) 123 { 124 return key->push_image; 112 125 } 113 126 -
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard-layout.c
r511 r1158 24 24 MBKeyboard *kbd; 25 25 char *id; 26 MBKeyboardImage *background; 26 27 List *rows; 27 28 }; … … 42 43 43 44 void 45 mb_kbd_layout_set_background(MBKeyboardLayout *layout, 46 MBKeyboardImage *background) 47 { 48 layout->background = background; 49 } 50 51 MBKeyboardImage * 52 mb_kbd_layout_get_background(MBKeyboardLayout *layout) 53 { 54 return layout->background; 55 } 56 57 void 44 58 mb_kbd_layout_append_row(MBKeyboardLayout *layout, 45 59 MBKeyboardRow *row) -
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard-ui-xft-backend.c
r542 r1158 148 148 rect.height = mb_kbd_ui_x_win_height(ui) - rect.y - 1; 149 149 150 /* clear it */ 151 152 XSetForeground(xdpy, xft_backend->xgc, WhitePixel(xdpy, xscreen)); 153 154 XFillRectangles(xdpy, backbuffer, xft_backend->xgc, &rect, 1); 155 156 image = mb_kbd_key_get_back_image(key); 150 if (mb_kbd_key_is_held(kbd, key)) 151 image = mb_kbd_key_get_push_image(key); 152 else 153 image = mb_kbd_key_get_normal_image(key); 157 154 if(image) 158 155 { … … 170 167 else 171 168 { 169 /* clear it */ 170 171 XSetForeground(xdpy, xft_backend->xgc, WhitePixel(xdpy, xscreen)); 172 173 XFillRectangles(xdpy, backbuffer, xft_backend->xgc, &rect, 1); 174 172 175 /* draw 'main border' */ 173 176 … … 246 249 } 247 250 251 /* 248 252 if (mb_kbd_key_get_face_type(key, state) == MBKeyboardKeyFaceGlyph) 249 253 { … … 294 298 0, 0, 0, 0, x, y, w, h); 295 299 } 300 */ 296 301 } 297 302 … … 300 305 { 301 306 MBKeyboardUIBackendXft *xft_backend = NULL; 302 303 xft_backend = (MBKeyboardUIBackendXft*)mb_kbd_ui_backend(ui); 307 MBKeyboardImage *image; 308 309 xft_backend = (MBKeyboardUIBackendXft*)mb_kbd_ui_backend(ui); 310 311 image = mb_kbd_layout_get_background(mb_kbd_get_selected_layout(mb_kbd_ui_kbd(ui))); 304 312 305 313 /* Background */ 306 XSetForeground(mb_kbd_ui_x_display(ui), 307 xft_backend->xgc, xft_backend->xcol_f4f4f4.pixel); 308 309 XFillRectangle(mb_kbd_ui_x_display(ui), 310 mb_kbd_ui_backbuffer(ui), 311 xft_backend->xgc, 312 0, 0, 313 mb_kbd_ui_x_win_width(ui), 314 mb_kbd_ui_x_win_height(ui)); 315 316 XSetForeground(mb_kbd_ui_x_display(ui), 317 xft_backend->xgc, 318 BlackPixel(mb_kbd_ui_x_display(ui), 319 mb_kbd_ui_x_screen(ui))); 320 314 if (image == NULL) 315 { 316 XSetForeground(mb_kbd_ui_x_display(ui), 317 xft_backend->xgc, xft_backend->xcol_f4f4f4.pixel); 318 319 XFillRectangle(mb_kbd_ui_x_display(ui), 320 mb_kbd_ui_backbuffer(ui), 321 xft_backend->xgc, 322 0, 0, 323 mb_kbd_ui_x_win_width(ui), 324 mb_kbd_ui_x_win_height(ui)); 325 326 XSetForeground(mb_kbd_ui_x_display(ui), 327 xft_backend->xgc, 328 BlackPixel(mb_kbd_ui_x_display(ui), 329 mb_kbd_ui_x_screen(ui))); 330 } 331 else 332 { 333 int w, h; 334 335 w = mb_kbd_image_width (image); 336 h = mb_kbd_image_height (image); 337 338 XRenderComposite(mb_kbd_ui_x_display(ui), 339 PictOpOver, 340 mb_kbd_image_render_picture(image), 341 None, 342 XftDrawPicture(xft_backend->xft_backbuffer), 343 0, 0, 0, 0, 0, 0, w, h); 344 } 321 345 322 346 } -
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard-ui.c
r542 r1158 135 135 if (width) *width = geometry[2]; 136 136 if (height) *height = geometry[3]; 137 fprintf(stderr, "x=%d,y=%d,w=%d,h=%d\n",geometry[0],geometry[1],geometry[2],geometry[3]);138 137 139 138 XFree(geometry); … … 342 341 } 343 342 } 344 if (mb_kbd_key_get_ back_image(key))345 { 346 MBKeyboardImage *img = mb_kbd_key_get_ back_image(key);343 if (mb_kbd_key_get_normal_image(key)) 344 { 345 MBKeyboardImage *img = mb_kbd_key_get_normal_image(key); 347 346 348 347 if (mb_kbd_image_width (img) > max_w) … … 438 437 439 438 row_item = util_list_next(row_item); 440 fprintf(stderr, "the key_x=%d,key_y=%d\n", key_x, key_y); 441 } 442 fprintf(stderr, "max_row_key_height=%d,max_row_width=%d\n", max_row_key_height, max_row_width); 439 } 443 440 444 441 *height = row_y; … … 469 466 470 467 free_space = max_row_width - mb_kbd_row_width(row); 471 fprintf(stderr, "free_space=%d, max_row_width=%d, mb_kbd_row_width(row)=%d\n", free_space, max_row_width, mb_kbd_row_width(row));472 468 473 469 mb_kbd_row_for_each_key(row, key_item) … … 525 521 526 522 *width = max_row_width; 523 524 if (mb_kbd_layout_get_background(layout) != NULL) 525 { 526 MBKeyboardImage *img; 527 int img_wid; 528 int img_hei; 529 530 img = mb_kbd_layout_get_background(layout); 531 img_wid = mb_kbd_image_width(img); 532 img_hei = mb_kbd_image_height(img); 533 534 if (img_wid > *width) 535 *width = img_wid; 536 537 if (img_hei > *height) 538 *height = img_hei; 539 } 527 540 } 528 541 … … 668 681 } 669 682 670 win_attr.override_redirect = True;/* Set to true for extreme case */671 /*win_attr.override_redirect = False;*//* Set to true for extreme case */683 /*win_attr.override_redirect = True;*/ /* Set to true for extreme case */ 684 win_attr.override_redirect = False; /* Set to true for extreme case */ 672 685 win_attr.event_mask 673 686 = ButtonPressMask|ButtonReleaseMask|Button1MotionMask|StructureNotifyMask; … … 681 694 CWOverrideRedirect|CWEventMask, 682 695 &win_attr); 683 fprintf(stderr, "ui->xwin_width=%d,ui->xwin_height=%d\n", ui->xwin_width, ui->xwin_height);684 696 685 697 … … 1039 1051 new_state = want_extended(ui); 1040 1052 1041 fprintf(stderr, "########################################################\n");1042 1053 if (new_state == old_state) /* Not a rotation */ 1043 1054 { … … 1250 1261 mb_kbd_ui_allocate_ui_layout(ui, 1251 1262 &ui->base_alloc_width, &ui->base_alloc_height); 1252 fprintf(stderr, "ui->base_alloc_width=%d, ui->base_alloc_height=%d\n",ui->base_alloc_width, ui->base_alloc_height);1253 1263 1254 1264 ui->xwin_width = ui->base_alloc_width; -
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard.c
r542 r1158 90 90 if (want_small) 91 91 { 92 kb->key_border = 1;92 kb->key_border = 0; 93 93 kb->key_pad = 0; 94 94 kb->col_spacing = 0; 95 95 kb->row_spacing = 0; 96 kb->font_pt_size = 1 0;96 kb->font_pt_size = 12; 97 97 } 98 98 -
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard.h
r530 r1158 342 342 343 343 void 344 mb_kbd_layout_set_background(MBKeyboardLayout *layout, 345 MBKeyboardImage *background); 346 347 MBKeyboardImage * 348 mb_kbd_layout_get_background(MBKeyboardLayout *layout); 349 350 void 344 351 mb_kbd_layout_append_row(MBKeyboardLayout *layout, 345 352 MBKeyboardRow *row); … … 393 400 394 401 void 395 mb_kbd_key_set_ back_image(MBKeyboardKey *key, MBKeyboardImage *image);402 mb_kbd_key_set_normal_image(MBKeyboardKey *key, MBKeyboardImage *image); 396 403 397 404 MBKeyboardImage * 398 mb_kbd_key_get_back_image(MBKeyboardKey *key); 405 mb_kbd_key_get_normal_image(MBKeyboardKey *key); 406 407 void 408 mb_kbd_key_set_push_image(MBKeyboardKey *key, MBKeyboardImage *image); 409 410 MBKeyboardImage * 411 mb_kbd_key_get_push_image(MBKeyboardKey *key); 399 412 400 413 void
Note: See TracChangeset
for help on using the changeset viewer.
