Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Technical questions (numbered tile markers )
Home

[Freeciv-Dev] Technical questions (numbered tile markers )

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Technical questions (numbered tile markers )
From: Teemu Kurppa <tkurppa@xxxxxxxxxx>
Date: Tue, 8 Jan 2002 18:54:33 +0200 (EET)

I came up with some questions, when I was implementing a patch for 
numbered tile markers. 

1. GTK key events
Numbered tile markers can be used to mark important locations (among
other things) on the map and then jump between them. Obviously, number
keys are good candidates for shortcut keys to markers 1-10. I chose
shift+<num> to set a marker and ctrl+<num> to jump to a marker. 

However, it seems that I can't implement this kind of behavior in truly
portable way. Xserver and thus GTK work in somewhat irritating way, when
producing key events. For example, if I press shift+8 (or ctrl+8), GTK
doesn't produce key event for a key code GDK_8 with SHIFT_MASK
set. Instead it produces a key event for a key code GDK_parenleft or
something else, if your keymap has been modified (xmodmap -pke tells
what). 

Does anyone know a good solution to this problem ? If not, we have to
implement keyboard shortcuts for some particular keymap, and inform
players how to change their keymaps, if they differ.   

2. Other clients 
Although I've implemented tile markers only for a non-isometric mode of
the GTK client, most of the code for tile markers is common to all 
clients. However, there is one dependency from the common code to
the client specific code: function get_map_pos_under_mouse_pointer. I put
the declaration to client/include/mapctrl_g.h. I presume, that I need to
define dummy versions of this in all clients to make them compile, right ? 

3. Usage of attribute.c
I have send some questions on the usage of attributes in previous 
messages. 

4. Documentation 
I have thought some future directions for tile markers. Is there some
standard place, where to put general descriptions and thoughts in addition
of freeciv-dev ? README.tile_markers ? 

And is there CVS for Freeciv manuals ? So that I could add the description
and examples of the marker usage. 

5. Code Style Guide 
Some version of style guide is needed quickly. It would be helpful, if
recommended usage of indent is described. In similar way, that the usage
of patch and diff is described in "How to Contribute" section on web 
pages. 

Teemu Kurppa 



[Prev in Thread] Current Thread [Next in Thread]