type
stringclasses
5 values
content
stringlengths
9
163k
functions
int evas_init(void) { if (++_evas_init_count != 1) return _evas_init_count; #ifdef LKDEBUG if (getenv("EVAS_LOCK_DEBUG")) { lockdebug = EINA_TRUE; lockmax = atoi(getenv("EVAS_LOCK_DEBUG")); }
functions
int evas_shutdown(void) { if (_evas_init_count <= 0) { EINA_LOG_ERR("Init count not greater than 0 in shutdown."); return 0; }
functions
void evas_free(Evas *e) { Eina_Rectangle *r; Evas_Coord_Touch_Point *touch_point; Evas_Layer *lay; int i; int del; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->walking_list > 0) return; evas_render_idle_flush(e); _evas_post_event_callback_free(e); del = ...
functions
void evas_output_method_set(Evas *e, int render_method) { Evas_Module *em; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); /* if our engine to set it to is invalid - abort */ if (render_method == RENDER_METHOD_INVALID) return; /* if the engine is already set up - abort */ if (e->o...
functions
int evas_output_method_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return RENDER_METHOD_INVALID; MAGIC_CHECK_END(); return e->output.render_method; }
functions
Eina_Bool evas_engine_info_set(Evas *e, Evas_Engine_Info *info) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return EINA_FALSE; MAGIC_CHECK_END(); if (!info) return EINA_FALSE; if (info != e->engine.info) return EINA_FALSE; if (info->magic != e->engine.info_magic) return EINA_FALSE; return (Eina_Bool)e->eng...
functions
void evas_output_size_set(Evas *e, int w, int h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if ((w == e->output.w) && (h == e->output.h)) return; if (w < 1) w = 1; if (h < 1) h = 1; e->output.w = w; e->output.h = h; e->output.changed = 1; e->output_validity++; e->c...
functions
void evas_output_size_get(const Evas *e, int *w, int *h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (w) *w = e->output.w; if (h) *h = e->output.h; }
functions
void evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if ((x == e->viewport.x) && (y == e->viewport.y) && (w == e->viewport.w) && (h == e->viewport.h)) return; if (w <= 0) return; if (h <= 0...
functions
void evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (x) *x = e->viewport.x; if (y) *y = e->viewport.y; if (w) ...
functions
void evas_output_framespace_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if ((x == e->framespace.x) && (y == e->framespace.y) && (w == e->framespace.w) && (h == e->framespace.h)) return; e->framespace.x = x; ...
functions
void evas_output_framespace_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (x) *x = e->framespace.x; if (y) *y = e->framespace.y; ...
functions
Evas_Coord evas_coord_screen_x_to_world(const Evas *e, int x) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->output.w == e->viewport.w) return e->viewport.x + x; return (long long)e->viewport.x + (((long long)x * (long long)e->viewport.w) / (long long)e->output.w); }
functions
Evas_Coord evas_coord_screen_y_to_world(const Evas *e, int y) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->output.h == e->viewport.h) return e->viewport.y + y; return (long long)e->viewport.y + (((long long)y * (long long)e->viewport.h) / (long long)e->output.h); }
functions
int evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->output.w == e->viewport.w) return x - e->viewport.x; return (int)((((long long)x - (long long)e->viewport.x) * (long long)e->output.w) / (long long)e->viewport.w); }
functions
int evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->output.h == e->viewport.h) return y - e->viewport.y; return (int)((((long long)y - (long long)e->viewport.y) * (long long)e->output.h) / (long long)e->viewport.h); }
functions
int evas_render_method_lookup(const char *name) { Evas_Module *em; if (!name) return RENDER_METHOD_INVALID; /* search on the engines list for the name */ em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name); if (!em) return RENDER_METHOD_INVALID; return em->id_engine; }
functions
void evas_render_method_list_free(Eina_List *list) { const char *s; EINA_LIST_FREE(list, s) eina_stringshare_del(s); }
functions
Eina_Bool evas_object_image_extension_can_load_get(const char *file) { const char *tmp; Eina_Bool result; tmp = eina_stringshare_add(file); result = evas_common_extension_can_load_get(tmp); eina_stringshare_del(tmp); return result; }
functions
Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file) { return evas_common_extension_can_load_get(file); }
functions
void evas_pointer_output_xy_get(const Evas *e, int *x, int *y) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; return; MAGIC_CHECK_END(); if (x) *x = e->pointer.x; if (y) *y = e->pointer.y; }
functions
void evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; return; MAGIC_CHECK_END(); if (x) *x = e->pointer.x; if (y) *y = e->pointer.y; }
functions
int evas_pointer_button_down_mask_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return (int)e->pointer.button; }
functions
Eina_Bool evas_pointer_inside_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return (int)e->pointer.inside; }
functions
void evas_data_attach_set(Evas *e, void *data) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->attach_data = data; }
functions
void evas_focus_in(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->focus) return; e->focus = 1; evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL); }
functions
void evas_focus_out(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!e->focus) return; e->focus = 0; evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL); }
functions
Eina_Bool evas_focus_state_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return e->focus; }
functions
void evas_nochange_push(Evas *e) { e->nochange++; }
functions
void evas_nochange_pop(Evas *e) { e->nochange--; }
functions
void _evas_walk(Evas *e) { e->walking_list++; }
functions
void _evas_unwalk(Evas *e) { e->walking_list--; if ((e->walking_list == 0) && (e->delete_me)) evas_free(e); }
functions
void evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b) { evas_common_convert_color_hsv_to_rgb(h, s, v, r, g, b); }
functions
void evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v) { evas_common_convert_color_rgb_to_hsv(r, g, b, h, s, v); }
functions
void evas_color_argb_premul(int a, int *r, int *g, int *b) { evas_common_convert_color_argb_premul(a, r, g, b); }
functions
void evas_color_argb_unpremul(int a, int *r, int *g, int *b) { evas_common_convert_color_argb_unpremul(a, r, g, b); }
functions
void evas_data_argb_premul(unsigned int *data, unsigned int len) { if (!data || (len < 1)) return; evas_common_convert_argb_premul(data, len); }
functions
void evas_data_argb_unpremul(unsigned int *data, unsigned int len) { if (!data || (len < 1)) return; evas_common_convert_argb_unpremul(data, len); }
includes
#include <config.h>
includes
#include <stdlib.h>
defines
#define LOGMODULE test
functions
int test_esys_quote(ESYS_CONTEXT * esys_context) { TSS2_RC r; ESYS_TR primaryHandle = ESYS_TR_NONE; TPM2B_PUBLIC *outPublic = NULL; TPM2B_CREATION_DATA *creationData = NULL; TPM2B_DIGEST *creationHash = NULL; TPMT_TK_CREATION *creationTicket = NULL; TPM2B_ATTEST *attest = NULL; TPMT_SI...
functions
int test_invoke_esys(ESYS_CONTEXT * esys_context) { return test_esys_quote(esys_context); }
includes
#include <linux/module.h>
includes
#include <linux/fs.h>
includes
#include <linux/miscdevice.h>
includes
#include <linux/watchdog.h>
includes
#include <linux/of_platform.h>
includes
#include <linux/uaccess.h>
includes
#include <linux/clk.h>
includes
#include <linux/io.h>
includes
#include <lantiq_soc.h>
defines
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
defines
#define LTQ_WDT_PW1 0x00BE0000
defines
#define LTQ_WDT_PW2 0x00DC0000
defines
#define LTQ_WDT_CR 0x0 /* watchdog control register */
defines
#define LTQ_WDT_SR 0x8 /* watchdog status register */
defines
#define LTQ_WDT_SR_EN (0x1 << 31) /* enable bit */
defines
#define LTQ_WDT_SR_PWD (0x3 << 26) /* turn on power */
defines
#define LTQ_WDT_SR_CLKDIV (0x3 << 24) /* turn on clock and set */
defines
#define LTQ_WDT_DIVIDER 0x40000
defines
#define LTQ_MAX_TIMEOUT ((1 << 16) - 1) /* the reload field is 16 bit */
functions
void ltq_wdt_enable(void) { unsigned long int timeout = ltq_wdt_timeout * (ltq_io_region_clk_rate / LTQ_WDT_DIVIDER) + 0x1000; if (timeout > LTQ_MAX_TIMEOUT) timeout = LTQ_MAX_TIMEOUT; /* write the first password magic */ ltq_w32(LTQ_WDT_PW1, ltq_wdt_membase + LTQ_WDT_CR); /* write the second magic plus the ...
functions
void ltq_wdt_disable(void) { /* write the first password magic */ ltq_w32(LTQ_WDT_PW1, ltq_wdt_membase + LTQ_WDT_CR); /* * write the second password magic with no config * this turns the watchdog off */ ltq_w32(LTQ_WDT_PW2, ltq_wdt_membase + LTQ_WDT_CR); }
functions
ssize_t ltq_wdt_write(struct file *file, const char __user *data, size_t len, loff_t *ppos) { if (len) { if (!nowayout) { size_t i; ltq_wdt_ok_to_close = 0; for (i = 0; i != len; i++) { char c; if (get_user(c, data + i)) return -EFAULT; if (c == 'V') ltq_wdt_ok_to_close = 1; el...
functions
long ltq_wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int ret = -ENOTTY; switch (cmd) { case WDIOC_GETSUPPORT: ret = copy_to_user((struct watchdog_info __user *)arg, &ident, sizeof(ident)) ? -EFAULT : 0; break; case WDIOC_GETBOOTSTATUS: ret = put_user(ltq_wdt_bootstatus, (int __...
functions
int ltq_wdt_open(struct inode *inode, struct file *file) { if (test_and_set_bit(0, &ltq_wdt_in_use)) return -EBUSY; ltq_wdt_in_use = 1; ltq_wdt_enable(); return nonseekable_open(inode, file); }
functions
int ltq_wdt_release(struct inode *inode, struct file *file) { if (ltq_wdt_ok_to_close) ltq_wdt_disable(); else pr_err("watchdog closed without warning\n"); ltq_wdt_ok_to_close = 0; clear_bit(0, &ltq_wdt_in_use); return 0; }
functions
int ltq_wdt_probe(struct platform_device *pdev) { struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct clk *clk; ltq_wdt_membase = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(ltq_wdt_membase)) return PTR_ERR(ltq_wdt_membase); /* we do not need to enable the clock as it is always...
functions
int ltq_wdt_remove(struct platform_device *pdev) { misc_deregister(&ltq_wdt_miscdev); return 0; }
functions
void stop (void) { /* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */ SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK; /* WFI instruction will start entry into STOP mode */ asm("WFI"); }
functions
void wait (void) { /* Clear the SLEEPDEEP bit to make sure we go into WAIT (sleep) mode instead * of deep sleep. */ SCB_SCR &= ~SCB_SCR_SLEEPDEEP_MASK; /* WFI instruction will start entry into WAIT mode */ asm("WFI"); }
functions
void write_vtor (int vtor) { /* Write the VTOR with the new value */ SCB_VTOR = vtor; }
functions
void enable_irq (int irq) { int div; /* Determine which of the NVICISERs corresponds to the irq */ div = irq/32; switch (div) { case 0x0: NVICICPR0 = 1 << (irq%32); NVICISER0 = 1 << (irq%32); break; case 0x1: NVICICPR1 = 1 <...
functions
void disable_irq (int irq) { int div; /* Determine which of the NVICICERs corresponds to the irq */ div = irq/32; switch (div) { case 0x0: NVICICER0 = 1 << (irq%32); break; case 0x1: NVICICER1 = 1 << (irq%32); break; c...
functions
void set_irq_priority (int irq, int prio) { /*irq priority pointer*/ uint8 *prio_reg; /* Determine which of the NVICIPx corresponds to the irq */ prio_reg = (uint8 *)(((uint32)&NVICIP0) + irq); /* Assign priority to IRQ */ *prio_reg = ( (prio&0xF) << (8 - ARM_INTERRUPT_LEVEL_BITS) ); ...
includes
#include <stdlib.h>
includes
#include <string.h>
includes
#include <stdio.h>
includes
#include <time.h>
main
int main(int argc, char *argv[]) { char *buf = (char *)NULL; buf = (char *)malloc(25*sizeof(char)); if (buf != (char *)NULL) { char *t = rand_text(); if (t) { strcpy(buf,t); free(t); }
includes
#include <math.h>
includes
#include <stdlib.h>
functions
double JHKeyframeAnimationFunctionLinear(double t,double b, double c, double d) { return c*(t/=d) + b; }
functions
double JHKeyframeAnimationFunctionEaseInQuad(double t,double b, double c, double d) { return c*(t/=d)*t + b; }
functions
double JHKeyframeAnimationFunctionEaseOutQuad(double t,double b, double c, double d) { return -c *(t/=d)*(t-2) + b; }
functions
double JHKeyframeAnimationFunctionEaseInOutQuad(double t,double b, double c, double d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }
functions
double JHKeyframeAnimationFunctionEaseInCubic(double t,double b, double c, double d) { return c*(t/=d)*t*t + b; }
functions
double JHKeyframeAnimationFunctionEaseOutCubic(double t,double b, double c, double d) { return c*((t=t/d-1)*t*t + 1) + b; }
functions
double JHKeyframeAnimationFunctionEaseInOutCubic(double t, double b, double c, double d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }
functions
double JHKeyframeAnimationFunctionEaseInQuart(double t, double b, double c, double d) { return c*(t/=d)*t*t*t + b; }
functions
double JHKeyframeAnimationFunctionEaseOutQuart(double t, double b, double c, double d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }
functions
double JHKeyframeAnimationFunctionEaseInOutQuart(double t, double b, double c, double d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }
functions
double JHKeyframeAnimationFunctionEaseInQuint(double t, double b, double c, double d) { return c*(t/=d)*t*t*t*t + b; }
functions
double JHKeyframeAnimationFunctionEaseOutQuint(double t, double b, double c, double d) { return c*((t=t/d-1)*t*t*t*t + 1) + b; }
functions
double JHKeyframeAnimationFunctionEaseInOutQuint(double t, double b, double c, double d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }
functions
double JHKeyframeAnimationFunctionEaseInSine(double t, double b, double c, double d) { return -c * cos(t/d * (M_PI_2)) + c + b; }
functions
double JHKeyframeAnimationFunctionEaseOutSine(double t, double b, double c, double d) { return c * sin(t/d * (M_PI_2)) + b; }
functions
double JHKeyframeAnimationFunctionEaseInOutSine(double t, double b, double c, double d) { return -c/2 * (cos(M_PI*t/d) - 1) + b; }
functions
double JHKeyframeAnimationFunctionEaseInExpo(double t, double b, double c, double d) { return (t==0) ? b : c * pow(2, 10 * (t/d - 1)) + b; }