Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-05-2013, 08:09 PM   #1
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Post gtk-sudoku

I didn't enable a whole bunch of functions.

but meh.

http://sourceforge.net/projects/gtk-sudoku/?source=dlp

works on the oldest KT thru to the newest PW1.

sudoku.

Enjoy.


(for Brian)
Attached Thumbnails
Click image for larger version

Name:	screenshot_2013-11-05T23_54_00-0000.gif
Views:	554
Size:	19.2 KB
ID:	114741   Click image for larger version

Name:	screenshot_2013_11_06T00_00_52+0000.png
Views:	588
Size:	39.5 KB
ID:	114742   Click image for larger version

Name:	screenshot_2013-11-05T23_54_59-0000.gif
Views:	517
Size:	19.1 KB
ID:	114743   Click image for larger version

Name:	screenshot_2013_11_06T00_05_48+0000.png
Views:	520
Size:	39.6 KB
ID:	114744   Click image for larger version

Name:	screenshot_2013-11-05T23_54_15-0000.gif
Views:	556
Size:	23.1 KB
ID:	114745   Click image for larger version

Name:	screenshot_2013_11_06T00_01_08+0000.png
Views:	509
Size:	19.0 KB
ID:	114746   Click image for larger version

Name:	screenshot_2013-11-05T23_55_06-0000.gif
Views:	504
Size:	21.3 KB
ID:	114747   Click image for larger version

Name:	screenshot_2013-11-05T23_55_18-0000.gif
Views:	511
Size:	30.5 KB
ID:	114748   Click image for larger version

Name:	screenshot_2013_11_06T00_02_24+0000.png
Views:	521
Size:	24.8 KB
ID:	114749   Click image for larger version

Name:	screenshot_2013_11_06T00_02_01+0000.png
Views:	533
Size:	29.7 KB
ID:	114750   Click image for larger version

Name:	screenshot_2013-11-05T23_54_30-0000.gif
Views:	505
Size:	30.4 KB
ID:	114751   Click image for larger version

Name:	screenshot_2013_11_06T00_01_26+0000.png
Views:	538
Size:	29.7 KB
ID:	114752   Click image for larger version

Name:	screenshot_2013_11_05T23_59_06+0000.png
Views:	499
Size:	12.1 KB
ID:	114753  
Attached Files
File Type: zip gtk-sudoku-KUAL-KT-PW.zip (5.57 MB, 744 views)
twobob is offline   Reply With Quote
Old 11-05-2013, 08:25 PM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
patch. (this is for DEVELOPERS to see what code changes were made) not required, nor exciting...
Attached Files
File Type: txt gtk-sudoku.patch.txt (15.1 KB, 402 views)

Last edited by twobob; 11-05-2013 at 10:57 PM.
twobob is offline   Reply With Quote
Old 11-05-2013, 09:07 PM   #3
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
Thank you, sir! Again.
brianinmaine is offline   Reply With Quote
Old 11-05-2013, 09:33 PM   #4
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
welcome mate.
twobob is offline   Reply With Quote
Old 11-06-2013, 12:18 AM   #5
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
did you write the toggle_keyboard() function or where is that from?

I also like the sizing part - SET_SIZE - you made it so its just enough to still show the keyboard. So did you did try matchbox-keyboard also? Then you could have a special layout for just the few buttons you need, right? numbers, backspace, and enter?

Amazing. Yup.
brianinmaine is offline   Reply With Quote
Old 11-06-2013, 12:30 AM   #6
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
i did try that and in fact have all the work to enable it. the save/open filefilechoosers however were a real PITA to handle tidily. and the layout got really ugly. so I nerfed them for now. the toggle keyboards is/was bafs. most of the time on this was deciding what could be easily ported. much could be reimplemented and indeed I left several stubs in the patch to help that along... glad you like it.

Last edited by twobob; 11-08-2013 at 04:22 PM.
twobob is offline   Reply With Quote
Old 11-06-2013, 01:10 AM   #7
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
Quote:
Originally Posted by twobob View Post
the save/open filefilechoosers however were a real PITA to handle tidily. and the layouht got really ugly. so I nerfed them for now.
The puzzles dialogs were also very troublesome and I just disabled them also. Not worth the effort IMO. I really was trying, just not able to get my head all the way around the sizing and keyboard stuff. Oh, well. A little more effort maybe, then onto other fun stuff. This IS supposed to be fun, right?
brianinmaine is offline   Reply With Quote
Old 11-06-2013, 07:45 AM   #8
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
right.

: )
twobob is offline   Reply With Quote
Old 11-06-2013, 08:23 AM   #9
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
the toggle keyboards is/was bafs.
You could also try something like this, using my openlipc.h:
Code:
#include <openlipc.h>

int is_keyboard_visible(){
     char publisher[]="com.lab126.keyboard";
     char property[]="show";
     int ivalue, lipc_handle, lipc_error;
     lipc_handle = LipcOpenNoName();
     if (!lipc_handle) {
       return -1;
     }
     lipc_error = LipcGetIntProperty(lipc_handle, publisher, property, &ivalue);
     LipcClose(lipc_handle);
     if (lipc_error) {
       return -1;
     }
     return ivalue;
}

int open_keyboard(){
     int lipc_handle, lipc_error;
     char publisher[]="com.lab126.keyboard";
     char property[]="open";
     char value[100];
     int p = getpid();
     snprintf(value, sizeof value, "com.lab126.gtkInputMethod%d:abc:0", p);
     lipc_handle = LipcOpenNoName();
     if (!lipc_handle) {
       return FALSE;
     }
     lipc_error = LipcSetStringProperty(lipc_handle, publisher, property, value);
     LipcClose(lipc_handle);
     if (lipc_error) {
       return FALSE;
     }
     return TRUE;
}

int close_keyboard(){
     int lipc_handle, lipc_error;
     char publisher[]="com.lab126.keyboard";
     char property[]="close";
     char value[100];
     int p = getpid();
     snprintf(value, sizeof value, "com.lab126.gtkInputMethod%d", p);
     lipc_handle = LipcOpenNoName();
     if (!lipc_handle) {
       return FALSE;
     }
     lipc_error = LipcSetStringProperty(lipc_handle, publisher, property, value);
     LipcClose(lipc_handle);
     if (lipc_error) {
       return FALSE;
     }
     return TRUE;
}

void toggle_keyboard() {
     if (is_keyboard_visible()) {
       close_keyboard();
     } else {
       open_keyboard();
     }
}
BTW you need to include gtkInputMethod+pid in the keyboard name only if there is a chance that keyboard was opened automatically by system. If you control keyboard only from your app you may choose whatever name you want.
baf is offline   Reply With Quote
Old 11-06-2013, 08:31 AM   #10
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Thanks mate. I was absolutely thinking about having a go with your open lipc when I did that, you read my mind.

However the majorly annoying filechooser's once again soaked up far too much of my time so I ended up with the "low calorie" solution above. (The filechoosers were visually buggy on the lowest KT version)

This is an excellent example, thanks very much, and I will either weld it back into this later or into the next thing for sure.

Last edited by twobob; 11-07-2013 at 12:23 AM.
twobob is offline   Reply With Quote
Reply

Tags
kindle, kual, sudoku, twobob

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gtk themes? aditya3098 Kindle Developer's Corner 2 10-30-2012 11:56 PM
linking to gtk chris_c Kindle Developer's Corner 7 08-25-2012 10:19 AM
Is a gtk version possible? frandavid100 Calibre 14 12-16-2008 04:09 PM
iLiad Need help getting started with gtk tribble iRex Developer's Corner 4 06-05-2007 01:38 PM
Multiplayer Sudoku: Sudoku Combat! PostGrant Lounge 1 06-20-2006 07:14 AM


All times are GMT -4. The time now is 11:30 PM.


MobileRead.com is a privately owned, operated and funded community.