Main window
This commit is contained in:
parent
95cddcca9a
commit
c5f22a13d2
|
@ -0,0 +1,46 @@
|
|||
project('exclaim', 'c', version: '0.0.0', license: 'GPL2',
|
||||
default_options: [ 'buildtype=plain', 'c_std=gnu99' ],
|
||||
meson_version: '>= 0.47.0')
|
||||
proj = meson.project_name()
|
||||
ver = meson.project_version()
|
||||
base_url = 'https://www.enlightenment.org/about-'
|
||||
cc = meson.get_compiler('c')
|
||||
m_dep = cc.find_library('m', required : false)
|
||||
deps = [
|
||||
dependency('elementary', version: '>= 1.26.0'),
|
||||
dependency('emotion', version: '>= 1.26.0'),
|
||||
m_dep
|
||||
]
|
||||
bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd', 'openbsd']
|
||||
linux = ['linux']
|
||||
sun = ['sunos']
|
||||
sys_linux = linux.contains(host_machine.system())
|
||||
sys_bsd = bsd.contains(host_machine.system())
|
||||
sys_sun = sun.contains(host_machine.system())
|
||||
dir_prefix = get_option('prefix')
|
||||
dir_bin = join_paths(dir_prefix, get_option('bindir'))
|
||||
dir_lib = join_paths(dir_prefix, get_option('libdir'))
|
||||
dir_data = join_paths(dir_prefix, get_option('datadir'))
|
||||
dir_locale = join_paths(dir_prefix, get_option('localedir'))
|
||||
cfg = configuration_data()
|
||||
cfg.set_quoted('PACKAGE' , proj)
|
||||
cfg.set_quoted('PACKAGE_NAME' , proj)
|
||||
cfg.set_quoted('PACKAGE_VERSION' , ver)
|
||||
cfg.set_quoted('PACKAGE_STRING' , proj + ' ' + ver)
|
||||
cfg.set_quoted('PACKAGE_URL' , base_url + proj)
|
||||
cfg.set_quoted('PACKAGE_BIN_DIR' , dir_bin)
|
||||
cfg.set_quoted('PACKAGE_LIB_DIR' , dir_lib)
|
||||
cfg.set_quoted('PACKAGE_DATA_DIR' , join_paths(dir_data, proj))
|
||||
cfg.set_quoted('LOCALEDIR' , dir_locale)
|
||||
cfg.set ('_GNU_SOURCE' , 1)
|
||||
cfg.set ('__EXTENSIONS__' , 1)
|
||||
cfg.set ('_POSIX_PTHREAD_SEMANTICS', 1)
|
||||
cfg.set ('_ALL_SOURCE' , 1)
|
||||
cfg.set ('_POSIX_SOURCE' , 1)
|
||||
cfg.set ('_POSIX_1_SOURCE' , 1)
|
||||
if sys_linux or sys_bsd or sys_sun
|
||||
cfg.set('STAT_NSEC', '1')
|
||||
endif
|
||||
configure_file(output: 'exclaim_config.h', configuration: cfg)
|
||||
subdir('src')
|
||||
# subdir('data')
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef ETC_H
|
||||
#define ETC_H
|
||||
|
||||
#define _E_COMMENT(...) do { \
|
||||
switch ((uintptr_t)__VA_ARGS__) \
|
||||
(void)__VA_ARGS__; \
|
||||
} while (0);
|
||||
|
||||
#define E_BEGIN _E_COMMENT
|
||||
#define E_END _E_COMMENT
|
||||
|
||||
#endif // ETC_H
|
|
@ -0,0 +1,27 @@
|
|||
#include <stdio.h>
|
||||
#include <Elementary.h>
|
||||
#include "../exclaim_config.h"
|
||||
#include "etc.h"
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc, char** argv)
|
||||
{
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
|
||||
elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
|
||||
elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
|
||||
elm_app_info_set(elm_main, "exclaim", "checkme");
|
||||
|
||||
Evas_Object* win = elm_win_util_standard_add("exclaim_root", "Exclaim");
|
||||
E_BEGIN(win);
|
||||
elm_win_icon_name_set(win, "email-unread");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
evas_object_resize(win, ELM_SCALE_SIZE(700), ELM_SCALE_SIZE(300));
|
||||
evas_object_show(win);
|
||||
E_END(win);
|
||||
|
||||
elm_run();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -0,0 +1,9 @@
|
|||
dir = join_paths(dir_bin)
|
||||
inc = include_directories('.')
|
||||
executable('exclaim', [
|
||||
'main.c',
|
||||
],
|
||||
include_directories: inc,
|
||||
dependencies: deps,
|
||||
install: true,
|
||||
install_dir: dir)
|
Loading…
Reference in New Issue