Browse Source

Move source code to folders src and csrc

master
Olaf Schulz 10 years ago
parent
commit
e094108d17
11 changed files with 52 additions and 190 deletions
  1. +6
    -4
      Makefile
  2. +0
    -0
      csrc/checkModifier.c
  3. +0
    -0
      csrc/keysend.c
  4. +0
    -0
      csrc/keysend.h
  5. +3
    -3
      src/config-manager.vala
  6. +3
    -3
      src/key-overlay.vala
  7. +12
    -171
      src/keybinding-manager.vala
  8. +0
    -0
      src/main.vala
  9. +0
    -0
      src/neo-window.vala
  10. +1
    -1
      src/tray.vala
  11. +27
    -8
      vapi/keysym.vapi

+ 6
- 4
Makefile View File

@ -8,7 +8,7 @@ BINDIR = bin
# for most cases the following two are the only you'll need to change
# add your source files here
SRC = main.vala neo-window.vala key-overlay.vala tray.vala config-manager.vala keybinding-manager.vala keysend.c checkModifier.c
SRC = src/main.vala src/neo-window.vala src/key-overlay.vala src/tray.vala src/config-manager.vala src/keybinding-manager.vala csrc/keysend.c csrc/checkModifier.c
# add your used packges here
PKGS = --pkg x11 --pkg keysym --pkg gtk+-2.0 --pkg gee-1.0 --pkg gdk-x11-2.0 --pkg posix
@ -22,7 +22,9 @@ VAPIDIR = --vapi=vapi/keysym.vapi
# compiler options for a debug build
#VALACOPTS = -g --save-temps
VALACOPTS =
VALAC_DEBUG_OPTS =
# compiler options for a debug build
VALAC_RELEASE_OPTS = -X -O2 --disable-assert
# set this as root makefile for Valencia
BUILD_ROOT = 1
@ -40,10 +42,10 @@ $(BINDIR):
ln -s ../assets bin/assets
bulid_debug:
@$(VALAC) $(VAPIDIR) $(VALACOPTS) $(SRC) -o $(BINDIR)/$(PROGRAM) $(PKGS) $(CC_INCLUDES)
@$(VALAC) $(VAPIDIR) $(VALAC_DEBUG_OPTS) $(SRC) -o $(BINDIR)/$(PROGRAM) $(PKGS) $(CC_INCLUDES)
bulid_release:
@$(VALAC) -X -O2 $(VAPIDIR) $(SRC) -o $(BINDIR)/$(PROGRAM)_release $(PKGS) $(CC_INCLUDES)
@$(VALAC) $(VAPIDIR) $(VALAC_RELEASE_OPTS) $(SRC) -o $(BINDIR)/$(PROGRAM)_release $(PKGS) $(CC_INCLUDES)
# clean all built files
clean:


checkModifier.c → csrc/checkModifier.c View File


keysend.c → csrc/keysend.c View File


keysend.h → csrc/keysend.h View File


config-manager.vala → src/config-manager.vala View File


key-overlay.vala → src/key-overlay.vala View File


keybinding-manager.vala → src/keybinding-manager.vala View File


main.vala → src/main.vala View File


neo-window.vala → src/neo-window.vala View File


tray.vala → src/tray.vala View File


+ 27
- 8
vapi/keysym.vapi View File

@ -2,7 +2,20 @@
[CCode (cprefix = "NeoLayoutViewer", lower_case_cprefix = "neo_layout_viewer_")]
namespace NeoLayoutViewer {
[CCode (cheader_filename = "main.h")]
[CCode (ref_function = "neo_layout_viewer_app_status_icon_ref", unref_function = "neo_layout_viewer_app_status_icon_unref", cheader_filename = "src/main.h")]
public class AppStatusIcon {
public Gtk.StatusIcon trayicon;
public AppStatusIcon (NeoLayoutViewer.NeoWindow neo_win);
public void create_menuMain ();
}
[CCode (ref_function = "neo_layout_viewer_config_manager_ref", unref_function = "neo_layout_viewer_config_manager_unref", cheader_filename = "src/main.h")]
public class ConfigManager {
public Gee.HashMap<string,string> config;
public ConfigManager (string conffile);
public void add_defaults ();
public Gee.HashMap<string,string> getConfig ();
}
[CCode (cheader_filename = "src/main.h")]
public class KeyEventBox : Gtk.EventBox {
public KeyEventBox (NeoLayoutViewer.NeoWindow winMain, int width, int height, ref uint[] keysym);
public KeyEventBox.freeArea (NeoLayoutViewer.NeoWindow winMain, int width, int height);
@ -10,7 +23,7 @@ namespace NeoLayoutViewer {
public KeyEventBox.modifier2 (NeoLayoutViewer.NeoWindow winMain, int width, int height, int modifier_index);
public override void size_request (out Gtk.Requisition requisition);
}
[CCode (cheader_filename = "main.h")]
[CCode (cheader_filename = "src/main.h")]
public class KeyOverlay : Gtk.VBox {
public Gee.HashMap<int,NeoLayoutViewer.KeyEventBox> keyBoxes;
public Gee.HashMap<int,NeoLayoutViewer.ArrayBox> keysyms;
@ -18,18 +31,16 @@ namespace NeoLayoutViewer {
public void generateKeyevents ();
public Gee.HashMap<int,NeoLayoutViewer.ArrayBox> generateKeysyms ();
}
[CCode (cheader_filename = "main.h")]
[CCode (cheader_filename = "src/main.h")]
public class KeybindingManager : GLib.Object {
[CCode (cheader_filename = "main.h")]
[CCode (cheader_filename = "src/main.h")]
public delegate void KeybindingHandlerFunc (Gdk.Event event);
public KeybindingManager (NeoLayoutViewer.NeoWindow neo_win);
public void bind (string accelerator, NeoLayoutViewer.KeybindingManager.KeybindingHandlerFunc handler);
public void bind2 (int keycode, string accelerator, int ebene, NeoLayoutViewer.KeybindingManager.KeybindingHandlerFunc handler);
public Gdk.FilterReturn event_filter (Gdk.XEvent gdk_xevent, Gdk.Event gdk_event);
public void unbind (string accelerator);
public void unbind2 (int keycode);
}
[CCode (cheader_filename = "main.h")]
[CCode (cheader_filename = "src/main.h")]
public class NeoWindow : Gtk.Window {
public int[] MODIFIER_MASK;
public int[] NEO_MODIFIER_MASK;
@ -55,6 +66,14 @@ namespace NeoLayoutViewer {
public override void show_all ();
public bool toggle ();
}
[CCode (cheader_filename = "main.h")]
[CCode (cheader_filename = "src/main.h")]
public static NeoLayoutViewer.ConfigManager configm;
[CCode (cheader_filename = "src/main.h")]
public static NeoLayoutViewer.KeybindingManager manager;
[CCode (cheader_filename = "src/main.h")]
public static NeoLayoutViewer.AppStatusIcon neo_tray;
[CCode (cheader_filename = "src/main.h")]
public static NeoLayoutViewer.NeoWindow neo_win;
[CCode (cheader_filename = "src/main.h")]
public static int main (string[] args);
}

Loading…
Cancel
Save