2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 #include <X11/Xatom.h>
22 #include <X11/Xutil.h>
24 int main(int argc, char *argv[])
26 unsigned char *prop_ret;
28 unsigned long bytes_after, num_ret;
38 d = XOpenDisplay(NULL);
40 printf("Display open error\n");
44 a_ac = XInternAtom(d, "ENLIGHTENMENT_AUTOCAPITAL_ALLOW", False);
46 printf("XInternAtom error\n");
50 r = XGetWindowProperty(d, DefaultRootWindow(d), a_ac, 0, 0x7fffffff,
51 False, XA_CARDINAL, &type_ret, &format_ret,
52 &num_ret, &bytes_after, &prop_ret);
54 printf("XGetWindowProperty error\n");
58 if (type_ret == XA_CARDINAL && format_ret == 32 && num_ret > 0
60 printf("Auto capital: %lu\n", ((unsigned long *)prop_ret)[0]);
65 a_ap = XInternAtom(d, "ENLIGHTENMENT_AUTOPERIOD_ALLOW", False);
67 printf("XInternAtom error\n");
71 r = XGetWindowProperty(d, DefaultRootWindow(d), a_ap, 0, 0x7fffffff,
72 False, XA_CARDINAL, &type_ret, &format_ret,
73 &num_ret, &bytes_after, &prop_ret);
75 printf("XGetWindowProperty error\n");
79 if (type_ret == XA_CARDINAL && format_ret == 32 && num_ret > 0
81 printf("Auto period: %lu\n", ((unsigned long *)prop_ret)[0]);